Hi All,

In the Home page, I have a selection (combo) box which is used to provide language options, say Chinese and English of the page. Therefore, user may select and then switch to a different display language specified in the selection box. Initially, I achieved this by providing a custom implementation of the PropertySelectionModel, in which the getLabel method returned the value of locale.getDisplayLanguage(locale). So, getLabel returns “Chinese (Taiwan)” (中文(台灣)) and “English” respectively for locales of Taiwan (zh_TW) and English (en_US). Actually, the problem occurred when user would like to see “Traditional Chinese” instead of simply “Chinese (Taiwan)” for the locale zh_TW. So far, I solved this problem by creating two separate property files, namely DisplayLanguage_zh_TW.properties and DisplayLanguage_en_US.properties for these two locales, specifying the key 'language' in the files and using getString(language) in the getLabel method to get either “Traditional Chinese” or “English” as the option label. However, I think this solution is not elegant as it requires creation of extra property files in addition to the exisiting Home.properties and Home_zh_TW.properties. So, I would like to ask here if there’s any better way to solve the problem?

Nathan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to