- Home /
Arabic Language
I was trying to write in arabic, the editor does not support arabic so i write on the GUI using script but the problem is that arabic font is right-to-left and unity writes it for left-to-right so words looks to be flipped instead of '' it is '' so what can i do to solve this problem because it is very important to me and i can't create my product without it.
the following is the label creation script:
GUI.Label(Rect(Screen.width/2,Screen.height/2,200,40),"",ArabStyle);
the arabstyle font is unicode in which i tried multiple types of fonts and still having the same result.
what i can do to solve this problem?
Answer by Lucas Meijer 1 · Jan 08, 2010 at 12:20 AM
Unity currently doesn't support right to left languages. The best workaround is trying to use bitmaps instead :(
Answer by Ashkan_gc · Jan 08, 2010 at 02:43 PM
Update we've released the package to the public. Click here for more info
unity don't render your text correctly even if you flip your font or reverse the string. rendering complex script languages like Arabic and Persian (Farsi) needs additional processing. in windows a library called uniscribe does this but you can not use it easily in unity. the renderer should know which character to render. for example we have different shapes of arabic letter "seen" and all of them has the same character in string. we made a solution to solve this problem. email me at ashkan_gc@yahoo.com for more information. also go and vote for right to left support here. our solution is a class that gets the string and replaces the characters with those characters that should be rendered because this part of unity is not scriptable unfortunately. vote for the above feedback and tell other users to do this because our solution is not as good as a built in solution. the standard way of rendering texts like arabic is to put logic in renderer. renderer don't modify the string like our script but instead render the correct character instead of those characters inside the string.
We've released the solution http://en.$$anonymous$$dhammergames.com/index.php/news/28-persianrenderer-is-released-in-asset-store.html
Here's what you want: http://u3d.as/content/raymon-game/raymon-right-to-left/3kv and the demo is here: try it: http://raymongame.com/rtl-demo/index.html
Answer by hamedaf · Jun 20, 2012 at 08:00 AM
there is a plugin in the asset store developed by a friend that would help you guys type arabic :)
Answer by baha · Jan 08, 2010 at 01:13 AM
IS there any idea on how to make my font work backword :),like how should i manipulate the font file? or can i add a custom class to do it for me? like manipulating the asset importer to flip it? i need users to write in arabic because im working on a chat application
i will do any scripting required to make it work for right-to-left but i need some guidelines :)