LoginPanel should display only supported language.

This commit is contained in:
Heng Sin Low 2010-10-26 18:57:21 +08:00
parent a757a02378
commit 916fef8565
1 changed files with 17 additions and 11 deletions

View File

@ -24,6 +24,7 @@
package org.adempiere.webui.panel;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;
@ -282,8 +283,13 @@ public class LoginPanel extends Window implements EventListener
// Update Language List
lstLanguage.getItems().clear();
String[] availableLanguages = Language.getNames();
ArrayList<String> supported = Env.getSupportedLanguages();
for (String langName : availableLanguages) {
Language language = Language.getLanguage(langName);
if (!language.isBaseLanguage()) {
if (!supported.contains(language.getAD_Language()))
continue;
}
lstLanguage.appendItem(langName, language.getAD_Language());
}