A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Locale + XLIFF .. can't get it working..

Threaded View

  1. #1
    Flash Gordon McUsher's Avatar
    Join Date
    Mar 2001
    Location
    Krautland
    Posts
    1,560

    Locale + XLIFF .. can't get it working..

    According to Flash8 help the flash code should be:
    Code:
    import mx.lang.Locale;
    Locale.autoReplace = true;
    Locale.addXMLPath("de","localetest_de.xml");
    Locale.addDelayedInstance(greeting_txt, "IDS_GREETING");
    Locale.loadLanguageXML("de", localeCallback)
    function localeCallback(success:Boolean) {
        if (success) {
            trace(Locale.stringIDArray); // IDS_GREETING
            trace(Locale.loadString("IDS_GREETING"));
        } else {
            trace("unable to load XML");
        }
    }
    According to XLIFF specs my localetest_de.xml should look like:
    Code:
    <?xml version="1.0"?>
    <xliff version="1.1">
     <file source-language="DE" datatype="plaintext" original="localetest_de.xml">
      <body>
       <trans-unit id="IDS_GREETING">
        <source>Hallo Welt!</source>
       </trans-unit>
      </body>
     </file>
    </xliff>
    But the TextField allways renders to "undefined" ...
    I suspect the XML beeing formated not correctly.
    I am totally lost now, anyone of u guys got it working yet?
    Last edited by McUsher; 11-22-2005 at 08:24 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