Arabic translation not connected correctly
6 years 7 months ago - 6 years 7 months ago #2991
by elusiven
Arabic translation not connected correctly was created by elusiven
Hi
I'm using dynamic translation and some static translation, with use of Localize component and without, in all cases though the Arabic symbols don't connect properly. I have created an Urdu language, and I'm using google spreadsheet.
I attached a photo of the problem.
It should say: چیک کریں
I'm using dynamic translation and some static translation, with use of Localize component and without, in all cases though the Arabic symbols don't connect properly. I have created an Urdu language, and I'm using google spreadsheet.
I attached a photo of the problem.
It should say: چیک کریں
Last edit: 6 years 7 months ago by elusiven.
Please Log in or Create an account to join the conversation.
6 years 7 months ago #3005
by studenman
Replied by studenman on topic Arabic translation not connected correctly
Isn't that a kerning problem? This wouldn't be related to I2L, but to your text component. If you're using TextMeshPro, make sure you import the kerning pairs when you create the Font Asset.
Please Log in or Create an account to join the conversation.
6 years 7 months ago - 6 years 7 months ago #3016
by elusiven
Replied by elusiven on topic Arabic translation not connected correctly
Hi,
I don't use TextMeshPro, I have a lot of labels and it will take me a long time to change them all to text mesh pro now.
Also I tried using specific Arabic font with TextMesh pro and applied kerning pairs, and kerning enabled on the component and it shows empty rectangles despite that it arabic characters.
Is there a working arabic example somewhere that I can download?
I don't use TextMeshPro, I have a lot of labels and it will take me a long time to change them all to text mesh pro now.
Also I tried using specific Arabic font with TextMesh pro and applied kerning pairs, and kerning enabled on the component and it shows empty rectangles despite that it arabic characters.
Is there a working arabic example somewhere that I can download?
Last edit: 6 years 7 months ago by elusiven.
Please Log in or Create an account to join the conversation.
6 years 7 months ago #3023
by studenman
Replied by studenman on topic Arabic translation not connected correctly
TextMeshPro is free and I believe they have a tool now that will migrate old Text components to TextMeshPro. Highly recommend it, even if you have to hand-convert all the text fields. It's better in the long term to have a proper text rendering system.
Please Log in or Create an account to join the conversation.
6 years 7 months ago #3024
by elusiven
Replied by elusiven on topic Arabic translation not connected correctly
I tried TextMeshPro but I don't get all the characters in the font. The text partly displays as rectangles. The font is arabic, so it has all the characters needed. added kerning pairs, and all the character ranges but it does not work properly.
Please Log in or Create an account to join the conversation.
6 years 7 months ago #3025
by Frank
Are you Give I2L 5 stars!
Are you Please lets us know how to improve it!
Replied by Frank on topic Arabic translation not connected correctly
Hi,
When TextMeshPro shows characters as squares it means that the characters are missing, and this can be because of one of two things:
1- The font used to generate the TextMeshPro font asset didn't have the missing chars.
Not all fonts have the complete Unicode charset, some have only Latin characters, other add some complementary sets. If the font you are using doesn't have those characters, TextMeshPro will not generate them (or will generate them as squares).
This can easily be identified by opening the TextMeshPro font texture and seeing if there are any squares, if there are, then you need to use another font or a fallback.
If that's your case, my advice is to rebuild the font asset, use your dynamic font, but add ARIAL_UNICODE as the fallback.
ARIAL_UNICODE is a version of the Arial font that has the entire Unicode charset, so any character missing from your original font, will be found in this fallback one.
Once you generate the font asset again, there should be no square chars in your texture.
2- You are not baking all the needed characters into TextMeshPro font.
Arabic and other similar languages, are written using some characters from the Arabic Charset block, however, when they are rendered, there are language rules that require some of those characters to be combined together or separated into others.
See here some examples of this: w3c.github.io/alreq/#h_ligatures
Most of those unions, are set in Unicode with a different character in the complement/extended blocks.
That's why the characters you see in the TextField are not necessarily what Unity should render/use.
To account for this, I2 Localization, goes to all your texts, parses them and converts them into the final characters that are really used for rendering, and those are the one that are reported to you. Those are the one you need in your atlases.
To find them, just use this Charset tool:
inter-illusion.com/assets/I2Localization...usedinLanguages.html
Paste those characters into TextMeshPro Font builder tool when generating the font asset. That will make sure that you have all the needed characters.
Hope that helps,
Frank
When TextMeshPro shows characters as squares it means that the characters are missing, and this can be because of one of two things:
1- The font used to generate the TextMeshPro font asset didn't have the missing chars.
Not all fonts have the complete Unicode charset, some have only Latin characters, other add some complementary sets. If the font you are using doesn't have those characters, TextMeshPro will not generate them (or will generate them as squares).
This can easily be identified by opening the TextMeshPro font texture and seeing if there are any squares, if there are, then you need to use another font or a fallback.
If that's your case, my advice is to rebuild the font asset, use your dynamic font, but add ARIAL_UNICODE as the fallback.
ARIAL_UNICODE is a version of the Arial font that has the entire Unicode charset, so any character missing from your original font, will be found in this fallback one.
Once you generate the font asset again, there should be no square chars in your texture.
2- You are not baking all the needed characters into TextMeshPro font.
Arabic and other similar languages, are written using some characters from the Arabic Charset block, however, when they are rendered, there are language rules that require some of those characters to be combined together or separated into others.
See here some examples of this: w3c.github.io/alreq/#h_ligatures
Most of those unions, are set in Unicode with a different character in the complement/extended blocks.
That's why the characters you see in the TextField are not necessarily what Unity should render/use.
To account for this, I2 Localization, goes to all your texts, parses them and converts them into the final characters that are really used for rendering, and those are the one that are reported to you. Those are the one you need in your atlases.
To find them, just use this Charset tool:
inter-illusion.com/assets/I2Localization...usedinLanguages.html
Paste those characters into TextMeshPro Font builder tool when generating the font asset. That will make sure that you have all the needed characters.
Hope that helps,
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.
Time to create page: 0.176 seconds