Search code examples
actionscript-3flash-cc

Use non-latin alphabets in dynamic textfields


I'm trying to translate my app in a few languages, but i'm having trouble with non-latin alphabets. (I'm working with Flash CC, my app is Air for Android) I'm not a pro so I had to improvize for localization: the user clicks the button corresponding to his/r language and it updates a variable (lang=1 for french, lang=2 for english, etc.).

if (lang==1){
    textField.text="Salut";
else if (lang==2{
    textField.text="Hi";
//and so on
}

It's probably the ugliest way to do it but it works. I'd also like to be able to translate my app to japanese, arabic and maybe russian. I've tried to copy/paste the arabic text in the textfield, it works, but not when i paste it in my code. I've read online that you could do it up to Flash CS6 thanks to TFL textfields, but (whatever they were) they do not exist anymore in CC. Anyone know how to do this? Thanks in advance ;)


Solution

  • To use any characters in dynamic TextField you should embed these characters by clicking "Embed..." in properties panel and choosing all characters you will use in this text field. For example, for Japanese you should check at least one checkbox:enter image description here Also, you should choose Font Family and Style.