Share Right-To-Left again

cancel
Showing results for 
Search instead for 
Did you mean: 
jamilnour
Established Member

Share Right-To-Left again

Hello,

I can find in this forum some old discussion about how to support RTL in Share depends on locale.

I must do this task even it seems it is complex to achieve. I finished all the translation and it is time for RTL support.

Can anybody explain to me in details how to do exactly?

The main constraint I have is the possibility to keep the work when upgrading to a new version

Is 5.2 can help?

Some components are embedded into jars. How to change and support RTL inside them?

Thank you

Jamil

4 Replies
angelborroy
Alfresco Employee

Re: Share Right-To-Left again

Probably you can take these packages as sample: Alfresco translations: collaborative internationalization and quality translation system Crowdin 

Hyland Developer Evangelist
jamilnour
Established Member

Re: Share Right-To-Left again

This is a translation project only. What about RTL support?

Thanks

afaust
Master

Re: Share Right-To-Left again

I believe ‌ has worked on RTL support in Share/AIkau in one of this previous projects. I hope he will take this mention as an invite to share his expertise on this matter.

yreg
Active Member II

Re: Share Right-To-Left again

Hi Jamil!

I did work on a similar projects both in the context of Alfresco Share (4.2.x, 5.0.x CE), and standalone SpringSurf/Aikau applications and here are a few thoughts I can share with you in the context of share to correctly RTL display the application, however this is how I did address this a while back, given the current state of things at the time, and might be not the optimal/best way to do it :

- Styling for leftovers from the YUI era, including CSS, and JS used for styling/positioning; this is doable by extending the surf pages main template and extend it to conditionally set dir to RTL an import an extra lib.ftl with all the css/js to do the necessary overrides on the detection of one of the RTL locales; You might as well need to override some image assets presenting texts/arrow/... Upgrading this part should be as easy as copying over the new lib.ftl/CSS/JS/assets and make the appropriate changes to the main page template in share.

I believe this should be also doable via a Surf extension, but I had really hard time with order of loading and interpreting CSS/JS ... 

- Styling Aikau widgets; For this part, I extended the spring-surf mechanism for loading, interpreting & aggregating css/less files to try first <filename>.<locale>.<extension> then fallback to <filename>.<locale-without-country>.<extension> then fallback to <filename>.<extension>, I also needed to add all <filename>.ar.<extension> for several existing Aikau widgets at the time, in order to correctly display them for my locale... I then realized that even though the .css files from Aikau widgets have CSS extensions, they were actually less files, so it would've been possible to contribute changes to the Aikau project introducing new parameterized styling entries (and have them resolving from the main defaults.less file which could start by including locale dependent variable sets) instead of duplicating files to make the necessary changes.

I hope that helps !