How to enable or disable RTL editor value through Script?

As per my title suggest, how can I enable or disable RTL editor value through Script?

Because I have multiple languages within the game and only Hebrew language from this required this RTL editor checkbox enabled, all other required this value to be disabled.

So I must required to control this through script, please give your suggestion for this.

Hi,

You can use the isRightToLeftText property to enable RTL. You simply need to set that property value to true in your script.

@jonathan_h Sorry sir, for bothering you multiple times in different issues :slight_smile:

Yes, now I understand that TextMeshPro - Text component has isRightToLeftText property and through this we can able to RTL editor within Script.

7847997--995304--RTL variable update.png

I want to do settings like this way so manually I don’t required to manage for Hebrew language.
How to setup this? How checkbox will get tick mark when its Hebrew language?
This I can’t able to understand so please guide me into this.

Hi,

Please refer to Localized Property Variants | Localization | 1.1.1.

You need to enable the Track Changes toggle. Then switch to Hebrew and enable the flag. It will then record the change for Hebrew.

If you have any additional questions, i suggest you post your question in the following forum section: Unity Engine - Unity Discussions

1 Like

@jonathan_h After your above feedback, to enable isRightToLeftText value for Hebrew language I have done some exercise with GameObjectLocalizer script.
Something like this way:

This started working for me properly but one things I have noticed as problem.
Overall this thing is working based on recording, Localization Scene Controls → enable Track Changes to start record for that particular locale.

Total I have 23 languages within the game so for a single Text field, I require to travel through 23 locales and enable or disable its Enable RTL Editor checkbox within the Inspector.
Within the game I have many text labels and titles so if I prefer this way then it will become too time consuming and tedious task for me.

Please suggest me some smart way to achieve the same :slight_smile:

1 Like

Hi,

I would suggest moving this post or specific question to the localization section of forum. They could help you in more detail with your question.

1 Like

Just add this paragraph to the code:

yourTextMesh.isRightToLeftText = true;