-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for RTL languages #1929
base: 6.dev
Are you sure you want to change the base?
Conversation
Hello @nawafinity and thank you for your contribution. This looks pretty solid already. We'll give it some more testing and then approve. Thanks! |
Hello @intoeetive ,
|
@nawafinity is Arabic language pack for EE available for download somewhere? If not, can you send it to us? (even if it's incomplete, just for the testing purposes) |
Hello @intoeetive, sorry for the late reply, I was I've been very sick lately, you can find in the attachments the incomplete Arabic language pack. Right now I'm facing a problem with Popperjs it does not support RTL so I'm trying to upgrade it to version 2 or find a way to make it work with RTL layout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nawafinity sorry it took so long to do the in-depth review - everyone was busy getting EE7 out.
I've spotted few issues which I think need to be solved before we can merge this in:
-
The built-in fields (such as title, url_title, entry dates etc) are currently forced as LTR. I think it's reasonable for title and url_title to follow the language direction, but I'm not sure about the date fields?
-
It looks like the dropdown for entry status does not work when I switch the CP to Arabic (the other dropdowns
-
Looks like we need a way to force the LTR text direction for the specific fields. Currently in settings URL fields look like
/http:https://ee6.local
which is obviously not correct -
I don't think specifying the character map for URL title generation directly in JS file is the way to go. We have dedicated config file to store the mapping: https://docs.expressionengine.com/latest/config/config-files.html#foreign-characters
But I also not 100% sure we need to overload it with the full map for all languages... maybe that's something that could be done as part of language pack... not sure. Just noting this need to be handled in more "generic" way -
I also see stuff in the JS that is a) specific to just Arabic language and b) specific to your needs maybe? Like making URL titles support Arabic - I would assume not everyone would want that. So at the minimum, that needs to be configurable.
All in all, this seems to be more complex than it seemed initially.
I feel like # 1, 4, and 5 could be skipped from the PR, but the # 2 and 3 need to solved at the minimum.
I'll make the PR draft for now.
If you are not able / willing to contribute into this more currently, maybe you could just provide some ideas on the path to go, because out in-house experience with the RTL languages is quite limited.
Thank you
Hope this get merged soon :) |
Overview
I've been using ExpiressionEngine before it became open source, I really like it, and as an Arabic speaker I've been waiting for support for RTL languages for a long time and have recently been working on the Arabic language package and during that I decided to do the work needed to support RTL languages.
In this PR, I did the following:
Lang.php
that helps to get the language direction.package.json
rtl:css
Which you can use afterbuild:css
to create an RTL version of cp-styles.rtl:demo-css
Which you can use to create RTL version of user/site/default styles.Hope I did everything right.
Resolves #844.
Nature of This Change
Is this backwards compatible?
Documentation
User Guide Pull Request: https://github.com/ExpressionEngine/ExpressionEngine-User-Guide/pull/NNN