RTL multi-line wrapping with parameter
7 years 5 months ago - 7 years 5 months ago #2331
by smaika
RTL multi-line wrapping with parameter was created by smaika
Is there a way to make RTL languages line wrap correctly when using a parameter, and sometimes a parameter can change through script so I can't guarantee how many characters a label will be.
Or how exactly I should use it, can I have more explanation on this feature.
Please if there is a solution let me know
Or how exactly I should use it, can I have more explanation on this feature.
Please if there is a solution let me know
Last edit: 7 years 5 months ago by smaika.
Please Log in or Create an account to join the conversation.
7 years 5 months ago #2333
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic RTL multi-line wrapping with parameter
Hi,
I'm not sure I understand the problem. I have been trying parameters and RTL and seems to be working as expected.
Normally what happens is:
- The term is used to find a translation
- If there is a callback set, that's called to modify the translation.
- The final translation is passed to the Global and Local parameters to replace the tags with the corresponding values.
e.g. "This is the {[PlayerColor} Player" -> "This is the red Player"
- Then, if the language is RTL (Arabic, etc):
- The text is split into lines of the size you specified
- Each line gets the Arabic fix applied to correct the rendering of the characters
That way, parameters work correctly with RTL and line length.
If you don't want the label to be split into multiple lines, then specify the -1 or 0 as the max characters value.
Otherwise, you should set it to how many characters fit in that label (e.g. type OOOOOO until the text gets bigger than the label, and type the number of Os you typed)
I can explain you each step futher if you need. But will really help, if you post here an screenshot of the problem you are seeing so that I can explain what that's happening and how to fix it.
Thanks,
Frank
I'm not sure I understand the problem. I have been trying parameters and RTL and seems to be working as expected.
Normally what happens is:
- The term is used to find a translation
- If there is a callback set, that's called to modify the translation.
- The final translation is passed to the Global and Local parameters to replace the tags with the corresponding values.
e.g. "This is the {[PlayerColor} Player" -> "This is the red Player"
- Then, if the language is RTL (Arabic, etc):
- The text is split into lines of the size you specified
- Each line gets the Arabic fix applied to correct the rendering of the characters
That way, parameters work correctly with RTL and line length.
If you don't want the label to be split into multiple lines, then specify the -1 or 0 as the max characters value.
Otherwise, you should set it to how many characters fit in that label (e.g. type OOOOOO until the text gets bigger than the label, and type the number of Os you typed)
I can explain you each step futher if you need. But will really help, if you post here an screenshot of the problem you are seeing so that I can explain what that's happening and how to fix it.
Thanks,
Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
To get the betas as soon as they are ready,
check this out
Please Log in or Create an account to join the conversation.
7 years 5 months ago - 7 years 5 months ago #2334
by smaika
Replied by smaika on topic RTL multi-line wrapping with parameter
So I don't need to enter the exact number of characters the label will be because the thing is since am using parameter and the parameter value gets changed through script I don't know how many characters the label will be. I'm using Unity UI text component and have Best Fit enabled will it work with Best Fit enabled?
Edit: after trying what you said
Edit: after trying what you said
I think I got the hang of ityou should set it to how many characters fit in that label (e.g. type OOOOOO until the text gets bigger than the label, and type the number of Os you typed)
Last edit: 7 years 5 months ago by smaika.
Please Log in or Create an account to join the conversation.
Time to create page: 0.254 seconds