Adobe Flex 4: loading localized framework program files

According to Adobe asdocs, frame Flex files must be loaded at runtime. These localized framework files, those that exist in (on windows) C: \ Program Files (x86) \ Adobe \ Adobe Flash Builder 4.5 \ sdks \ 4.5.0 \ frameworks \ locale, are responsible for elements such as button text in Alert Dialogs and many other controls. I expect that after loading these frame files I will see these resources in my Flex application.

I created my project as follows:

MyProject
   -src
   -Flex4.5
   -Referenced Libraries
   -bin-debug
   -bin-release
   -libs
   -locale (I've copied all of the directories(da_DK,en_US,es_ES,etc) of framework files for the locales I want to support inside of this dir)

Now in asdocs it is indicated that for this you need to set the compiler options for reading

-locale=en_US,da_DK,de_DE,es_ES,fi_FI,fr_FR,it_IT,ja_JP,ko_KR,nb_NO,nl_NL,pt_BR,ru_RU,sv_SE,zh_CN,zh_TW -allow-source-path-overlap=true -source-path=locale/{locale}

which i did.

My Build Path Libraries for Flex 4.5 - C:Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.0 are set to be Runtime Shared library (of note, the {locale} subfolder says "Merged into code")

But when I change the language in the browser, I don’t see any framework resources.

, , , , bin-release. bin-release ( ), ?

.swz bin ( , arent ).

- Runtime Framework Localization? ? , ( ), , , .

+3
1

ANT, :

<mxmlc file="${build.dir.src}/${mxml.file}" keep-generated-actionscript="false" output="${build.dir.stage}/${project.app.name}.swf" 
        actionscript-file-encoding="UTF-8" incremental="false" context-root="${project.app.name}" optimize="${app.optimize}"
        debug="${app.debug}" configname="air" locale="en_US,ja_JP,fr_FR">

<jvmarg value="-Xmx1024m" />
<jvmarg value="-Xms512m" />

<compiler.theme append="true" file="${FLEX_HOME}/frameworks/projects/spark/MXFTEText.css" />

<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${build.dir.locale.src}/{locale}" />

<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
    <include name="*.swc" />
</library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
    <include name="*.swc" />
</library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
    <include name="{locale}" />
</library-path>
<library-path dir="${build.dir.lib}" append="true">
    <include name="*.swc" />
</library-path>

, , :

[ResourceBundle('application')]

// set up the locale chain
ResourceManager.getInstance().localeChain = [ 'en_US', 'ja_JP', 'fr_FR' ];

// load resources
ResourceManager.getInstance().getString('application', 'some.string.code');

: . .

, , !

0

All Articles