05-19-2017 06:47 AM
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
05-19-2017 09:16 AM
Probably you can take these packages as sample: Alfresco translations: collaborative internationalization and quality translation system Crowdin
05-20-2017 06:07 AM
This is a translation project only. What about RTL support?
Thanks
05-22-2017 05:11 AM
05-22-2017 05:59 AM
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 !
Explore our Alfresco products with the links below. Use labels to filter content by product module.