Skip to main content
fzl_rshd
Inspiring
Oct 12, 2022 2:57 AM UTC
Answered

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

<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)";
	}
}

 

This topic is closed to new replies. Start a new post to keep the conversation going.
fzl_rshd
fzl_rshdCorrect answer
Inspiring
Oct 15, 2022 12:57 AM UTC

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

9 replies

Colin Holgate
Inspiring
Oct 13, 2022 3:21 PM UTC

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 "es":
          myTextField.text = greetingSpanish;
          break;
          default:
          myTextField.text = "Sorry your system's language is not supported at this time.";               
}
Translate
fzl_rshd
fzl_rshdAuthorCorrect answer
Inspiring
Oct 15, 2022 12:57 AM UTC

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

Translate
Colin Holgate
Inspiring
Oct 15, 2022 1:02 AM UTC

'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.

Translate
kglad
Community Expert
Community Expert
Oct 12, 2022 3:31 AM UTC

what kind of as3 project?

 

Translate
fzl_rshd
fzl_rshdAuthor
Inspiring
Oct 13, 2022 2:36 AM UTC

Adobe AIR

Translate