Flex 国际化

来源:互联网 发布:苹果Mac壁纸 编辑:程序博客网 时间:2024/05/18 02:58

1 create two folder  named  zh_CN, en_US ;

 

  create text.propertes in two folder

 

2 modify the compiler arguments : 

 

 -locale=zh_CN,en_US -source-path=locale/{locale}

 

    (if you got a warning : source path entry  : it doesn't matter :  Normal

if you don't want to see it : 

                you can add '-allow-source-path-overlap=true' here

)

3

 

<fx:Metadata>

[ResourceBundle("test")]

</fx:Metadata>

 

 

 Ok ,   

 

Let's do it

 

when you need to change the locale :  use' resourceManager.localeChain = 'selected name' ; // zh_CN or en_US'

原创粉丝点击