Uh oh!
There was an error while loading. Please reload this page.
[4.x] RTL support in the Control Panel - #9447
Conversation
jasonvarga
commented
Feb 1, 2024
Amazing. We were about to do this ourselves. |
jackmcdade
commented
Feb 1, 2024
You're welcome 🤗. I like Statamic and would suggest it to whole world in any language and any region... |
jackmcdade
commented
Feb 1, 2024
jasonvarga
commented
Feb 20, 2024
Maybe the translation can be changed if it's a RTL language. e.g. instead of saying |
# Conflicts: # resources/css/components/items.css # resources/css/elements/tables.css # resources/js/components/blueprints/Listing.vue # resources/js/components/blueprints/RegularField.vue # resources/js/components/blueprints/Section.vue # resources/js/components/data-list/ColumnPicker.vue # resources/js/components/data-list/Table.vue # resources/js/components/entries/PublishForm.vue # resources/js/components/field-validation/Builder.vue # resources/js/components/fields/Settings.vue # resources/js/components/fieldtypes/bard/Set.vue # resources/js/components/fieldtypes/date/RangePopover.vue # resources/js/components/fieldtypes/date/SinglePopover.vue # resources/js/components/fieldtypes/replicator/Set.vue # resources/js/components/globals/Sites.vue # resources/js/components/nav/Builder.vue # resources/js/components/structures/Branch.vue # resources/js/components/terms/PublishForm.vue # resources/js/components/users/Listing.vue # resources/views/blueprints/index.blade.php # resources/views/nav/updates.blade.php # resources/views/usergroups/show.blade.php # resources/views/utilities/partials/email-l6.blade.php # resources/views/utilities/partials/email-l7.blade.php # resources/views/utilities/phpinfo.blade.php
jasonvarga
commented
Mar 8, 2024
Hey @peimn why did slug fields need to be |
peimn
commented
Mar 8, 2024
@jasonvarga It is common for slugs to be written in Latin words, and we prefer to write it in Latin words as non-Latin writers. It is easy to remember and write. Furthermore, Statamic itself converts non-latin words to Latin. Therefore, I decided to make it a ltr. |
jasonvarga
commented
Mar 8, 2024
Okay I will leave it how you had it then. Thanks! |
This reverts commit 3916260.
…from the config or a user preference.
jasonvarga
commented
Mar 8, 2024
I've made a change to how the text direction of the CP is decided. You had it so that it depends on the selected site. I've changed it so that it's based on the configured locale or preference. If you have configured a language that should be RTL (like Arabic or Hebrew), it will be RTL. Similar to #9452, I didn't feel it was right that the whole control panel changed depending on what site you were targeting. If I speak one language, and I've set my preference to a specific language, I don't want the whole CP to change. However I do think it's a good idea to change the direction of the fields inside the publish forms when you're editing an entry in a specific site. This behavior is consistent with how Craft CMS works, and they do a great job with localization and RTL support. See in this screenshot, everything is in English/LTR (my preferred language) except the field (I only configured one) which is RTL because the current entry is Arabic. We can adjust that behavior in another PR though. There's so much in this one already. (It's fantastic!) |
peimn
commented
Mar 9, 2024
I haven't work with Craft CMS though I get the idea from your words. in #9452 we first had a look for prefered language and if user hadn't set any then switch would be done. But you are right, if we could apply language prefered direction to input fields and editors, it will suit to user needs. |
jasonvarga
commented
Mar 11, 2024
@peimn Do you have translation files for Persian? Everything seems to be ready to merge but I'm just curious what you are actually using since we don't include any RTL languages. |
peimn
commented
Mar 11, 2024
@jasonvarga yes I've, and I was waiting for this request to be merged then request to merge Persian language. I will send it in a minute. |
@jasonvarga#9707 now has Persian translation. Sorry it took a time. |




This PR will add rtl styles for RTL languages like Arabic, Persian, Hebrew...