A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Different Languages

  1. #1
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323

    Different Languages

    I want to make a game that can translate to other languages. not actionscript languages but english, french, etc.

  2. #2
    Senior Member vinayak.kadam's Avatar
    Join Date
    Oct 2006
    Location
    gotoAndPlay("Pune");
    Posts
    831
    Can you please detail a bit so that we can understand quite cleary your requirement!
    As ever,
    Vinayak Kadam

  3. #3
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    i want to use actionscript 2.0 to change the language from english to any other language i want. I think you can with the class: System but i am not sure.

  4. #4
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    use external loaded text is best for multi-language. i.e. when click on english, load speechEN.txt, or when click on French, load speechFR.txt. The thing is you'd need to seperate out the text within Flash and call them from different parts. Maybe each part each own variable and call it when needed.

  5. #5
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    hm i'd better off making another of the FLA file and changing all the words to... well whatever language. french, japanese, whatever. I wanted to know if there was a way to with actionscript and i already said, System class has something to do with the answer (I THINK BUT ANY OTHER SOLUTIONS ARE FINE AS LONG AS IT DOES NOT INVOLVE ME HAVING TO EWRITE EVERYTHING IN ANOTHER LANGUAGE!!!)

  6. #6
    |-'|-'|
    Join Date
    Jan 2006
    Posts
    273
    oh, you mean auto translate? no idea.

  7. #7
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    hey i know there's some way with System.IME!!!

    EDIT: I may be able to find this myself but keep looking anyway... this is something that will really help everybody!

    EDIT 2: languageCodeArray (Locale.languageCodeArray property)
    public static languageCodeArray : Array [read-only]

    An array containing language codes for the languages that have been specified or loaded into the FLA file. The language codes are not sorted alphabetically.

    Availability: ActionScript 2.0; Flash Player 8

    Example
    The following example loads a language XML file based on the current value of a ComboBox component. You drag a ComboBox component onto the Stage and give it an instance name of lang_cb. Using the Text tool, you create a dynamic text field and give it an instance name of greeting_txt. In the Strings panel, you add at least two active languages, set the replace strings radio option to "via ActionScript at runtime", and click OK. Next, you add a string ID of IDS_GREETING and enter text for each active language. Finally, you add the following ActionScript code to Frame 1 of the main Timeline:

    import mx.lang.Locale;
    Locale.setLoadCallback(localeListener);
    lang_cb.dataProvider = Locale.languageCodeArray.sort();
    lang_cb.addEventListener("change", langListener);

    function langListener(eventObj:Object):Void {
    Locale.loadLanguageXML(eventObj.target.value);
    }
    function localeListener(success:Boolean):Void {
    if (success) {
    greeting_txt.text = Locale.loadString("IDS_GREETING");
    } else {
    greeting_txt.text = "unable to load language XML file.";
    }
    }

    POSSIBLY THE ANSWER???
    Last edited by bounceboy; 03-18-2009 at 04:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center