Flex 国际化使用

主要是在runtime的时候加载一些文件,最大用处就是用做国际化,
1, 在flex中的project的property面板里选择flex compiler选项,在compiler arguments里添加参数:
比如-locale zh_CN -source-path=locale/{locale} -keep-all-type-selectors=true,其中的{locale}就是zh_CN ,而且zh_CN 其实就是一个目录2,创建配置文件(*.properties),里面都是键值对,比如name=123,old=123 ...
3,在flex程序中,绑定它。比如
<fx:Metadata>
        [ResourceBundle("ViewerStrings")]
    </fx:Metadata>

4,使用,在工程中通过这种方式获取this.resourceManager.getString('ViewerStrings','name')

原文地址:https://www.cnblogs.com/zuiyirenjian/p/2606953.html