简体   繁体   中英

Flex DateChooser in chinease and japanease Style

How I can change the display of Month and Year display to Japanese style (ie Year Month) as in Header of Flex DateField. What I would like to convert the style July 2011年 to 2011年 7月.[![enter image description here][1]][2]
How can we change the calender header format ? i have used DateField in flex.

Try to set

-locale=ja_JP

If you're using Flash Builder, write it below.
Project > Properties > Flex Compiler > Additional Compiler Arguments

If you want to change Japanese Style dynamically, set the locale both English and Japanese.

-locale=en_US,ja_JP

and can change dymamically like this.

private var resource: IResourceManager = ResourceManager.getInstance();
private function changeLocale(): void{
    if (user selected JP){
        resource.localeChain = ["ja_JP"];
    }else{
        resource.localeChain = ["en_US"];
    }
    resource.update();
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM