• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I change to link for multilanguage ?

Explorer ,
Oct 19, 2017 Oct 19, 2017

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.

TOPICS
ActionScript

Views

527

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 19, 2017 Oct 19, 2017

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

...

Votes

Translate

Translate
Community Expert ,
Oct 19, 2017 Oct 19, 2017

Copy link to clipboard

Copied

use Capabilities.language

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 19, 2017 Oct 19, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 19, 2017 Oct 19, 2017

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;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 19, 2017 Oct 19, 2017

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 20, 2017 Oct 20, 2017

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines