Author: thomas.heute(a)jboss.com
Date: 2010-01-19 10:46:49 -0500 (Tue, 19 Jan 2010)
New Revision: 1375
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
Log:
GTNPORTAL-307: Support for derivated languages (French from France, French from
Canada...)
Wrong display of languages in the form
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-19
15:44:34 UTC (rev 1374)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-19
15:46:49 UTC (rev 1375)
@@ -62,21 +62,17 @@
{
LocaleConfig localeConfig = (LocaleConfig)object;
Locale locale = localeConfig.getLocale();
- String displayName = locale.getDisplayLanguage(currentLocale);
+ String displayName =
capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale));
String lang = locale.getLanguage();
String country = locale.getCountry();
- String localedName;
+ String localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale));;
if (country != null && country.length() > 0)
{
- localedName =
- capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale) + "
(" + locale.getDisplayCountry(currentLocale) + ")");
+ displayName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale)) +
" - " + capitalizeFirstLetter(locale.getDisplayCountry(currentLocale));
+ localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale)) +
" - " + capitalizeFirstLetter(locale.getDisplayCountry(locale));
lang = lang + "_" + country;
}
- else
- {
- localedName =
capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale));
- }
if (localedName == null || localedName.length() == 0)
localedName = "???";