Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Of course, after googling a bit more I come across an article on <a href="http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization" rel="noreferrer">runtime localization</a>.</p> <p>And followed these steps:</p> <p>Add the following to the compiler arguments to specify the supported locales and their path: (In Flex Builder, select project and go properties -> Flex Compiler -> Additional Compiler Arguments)</p> <p><code>-locale=en_CA,fr_CA -source-path=locale/{locale}</code></p> <p>Create the following files: </p> <pre><code>src/locale/en_CA/resources.properties src/locale/fr_CA/resources.properties </code></pre> <p>And then the compiler complains: <code>unable to open 'C:\Program Files\Adobe\Flex Builder 3\sdks\3.1.0\frameworks\locale\en_CA'</code></p> <p>Which looks to be related to bug <a href="http://bugs.adobe.com/jira/browse/SDK-12507" rel="noreferrer">SDK-12507</a></p> <p><strong>Work around:</strong><br> In the <code>sdks\3.1.0\bin</code> directory, execute the following commands:</p> <pre><code>copylocale en_US en_CA copylocale en_US fr_CA </code></pre> <p>This will create the locale directories in the Flex Builder installation and build some required resources into them.</p> <p>Then in your <code>.mxml</code> files, reference the resource bundle:</p> <pre><code>&lt;mx:Metadata&gt; [ResourceBundle("resources")] &lt;/mx:Metadata&gt; </code></pre> <p>And internationalize the strings:</p> <pre><code>&lt;mx:TitleWindow title="Window Title"&gt; </code></pre> <p>becomes:</p> <pre><code>&lt;mx:TitleWindow title="{resourceManager.getString('resources', 'windowTitle')}"&gt; </code></pre> <p>and</p> <pre><code>var name:String = "Name"; </code></pre> <p>becomes:</p> <pre><code>var name:String = resourceManager.getString("resources", "name"); </code></pre> <p>And in your <code>src/locale/en_CA/resources.properties</code> file:</p> <pre><code>windowTitle=Window Title name=Name </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload