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

HELP! How to code ActionScript 3.0 replace text using system language

Explorer ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

<superfluous screenshot remove-kglad>

for example :

 

stage.addEventListener(Event.ENTER_FRAME, usingSystemLanguage)
function usingSystemLanguage(event:Event):void
{
	if(*Current Windows/Mac System Language*)
	{
		textExampler.text = "This text using your system language (id)";
	}
	else
	{
		textExampler.text = "This text using your system language (en)";
	}
}

 

TOPICS
ActionScript , Code

Views

490

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 2 Correct answers

LEGEND , Oct 13, 2022 Oct 13, 2022

This article shows how to use Capabilites.language:

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#languages

Here is an example from that page:

var lang:String = Capabilities.language;
   switch (lang) {
     case "en":
          myTextField.text = greetingEnglish;
          break;
     case "de":
          myTextField.text = greetingGerman;
          break;
     case "fr":
          myTextField.text = greetingFrench;
          break;
     case
...

Votes

Translate

Translate
Explorer , Oct 14, 2022 Oct 14, 2022

my current language is "id" (indonesia), can you find a way to make?

Votes

Translate

Translate
Community Expert ,
Oct 11, 2022 Oct 11, 2022

Copy link to clipboard

Copied

what kind of as3 project?

 

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 12, 2022 Oct 12, 2022

Copy link to clipboard

Copied

Adobe AIR

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
LEGEND ,
Oct 13, 2022 Oct 13, 2022

Copy link to clipboard

Copied

This article shows how to use Capabilites.language:

https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/Capabilities.html#l...

Here is an example from that page:

var lang:String = Capabilities.language;
   switch (lang) {
     case "en":
          myTextField.text = greetingEnglish;
          break;
     case "de":
          myTextField.text = greetingGerman;
          break;
     case "fr":
          myTextField.text = greetingFrench;
          break;
     case "es":
          myTextField.text = greetingSpanish;
          break;
          default:
          myTextField.text = "Sorry your system's language is not supported at this time.";               
}

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 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

my current language is "id" (indonesia), can you find a way to make?

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
LEGEND ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

'id' is the country code for Indonesia. 'in' is the language code for Indonesian. You could try those, but I am pretty sure it's not included.

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 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

when i code :

var thisIsMyLanguage:String = Capabilities.language;
trace (thisIsMyLanguage);

and pressing "Test", the output is "xu". Please watch this picture

itz_faizalarsh_0-1665796432301.pngitz_faizalarsh_3-1665796489252.png

itz_faizalarsh_4-1665796572418.png

 

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 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

and?  do you have a question?  did you check the link i posted that explains what that (and much more) means?

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
LEGEND ,
Oct 15, 2022 Oct 15, 2022

Copy link to clipboard

Copied

LATEST

As you will see at the link kglad gave, 'xu' is the code for all languages that are not known.

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 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

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