Copy link to clipboard
Copied
I make a multilingual AIR app in strings panel. I can translate to text successful..But my problem how can I change to link for user device language.Because I got a two different website for two different language.
the strings panel was dropped after flash cs6 (i believe). use something like:
import flash.system.Capabilities;
var language:String=Capabilities.language:
var englishObj = {tf1:"text for english textfield 1",tf2:"text for english textfield 2", etc};
var spanishObj ={tf1:"text in espanol for tf1",tf2:"text in espanol for ft2", etc};
etc.
var obj:Object= {en:englishObj, es:spanishObj};
var langObj:Object = obj[languate];
textfield_1.text = langObj.tf1;
if(language=="en"){
link = whatever;
} else if (langua
...Copy link to clipboard
Copied
use Capabilities.language
Copy link to clipboard
Copied
Thank you kglad I find some code.But I new to Animate CC and I can't find the Strings panel in Window/ Other panels.
Copy link to clipboard
Copied
the strings panel was dropped after flash cs6 (i believe). use something like:
import flash.system.Capabilities;
var language:String=Capabilities.language:
var englishObj = {tf1:"text for english textfield 1",tf2:"text for english textfield 2", etc};
var spanishObj ={tf1:"text in espanol for tf1",tf2:"text in espanol for ft2", etc};
etc.
var obj:Object= {en:englishObj, es:spanishObj};
var langObj:Object = obj[languate];
textfield_1.text = langObj.tf1;
if(language=="en"){
link = whatever;
} else if (language=="es"){
link = something else;
}
Copy link to clipboard
Copied
The string panel was very useful.Now I think I need to write lot of code for translate.Thank you again.
Copy link to clipboard
Copied
you're welcome.