Skip to main content
fzl_rshd
Inspiring
October 12, 2022
Answered

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

  • October 12, 2022
  • 2 replies
  • 931 views

<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 has been closed for replies.
Correct answer fzl_rshd

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

2 replies

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

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

Colin Holgate
Inspiring
October 15, 2022

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

kglad
Community Expert
Community Expert
October 12, 2022

what kind of as3 project?

 

fzl_rshd
fzl_rshdAuthor
Inspiring
October 13, 2022

Adobe AIR