LoginPanel should display only supported language.
This commit is contained in:
parent
a757a02378
commit
916fef8565
|
@ -24,6 +24,7 @@
|
||||||
package org.adempiere.webui.panel;
|
package org.adempiere.webui.panel;
|
||||||
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
@ -282,8 +283,13 @@ public class LoginPanel extends Window implements EventListener
|
||||||
// Update Language List
|
// Update Language List
|
||||||
lstLanguage.getItems().clear();
|
lstLanguage.getItems().clear();
|
||||||
String[] availableLanguages = Language.getNames();
|
String[] availableLanguages = Language.getNames();
|
||||||
|
ArrayList<String> supported = Env.getSupportedLanguages();
|
||||||
for (String langName : availableLanguages) {
|
for (String langName : availableLanguages) {
|
||||||
Language language = Language.getLanguage(langName);
|
Language language = Language.getLanguage(langName);
|
||||||
|
if (!language.isBaseLanguage()) {
|
||||||
|
if (!supported.contains(language.getAD_Language()))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
lstLanguage.appendItem(langName, language.getAD_Language());
|
lstLanguage.appendItem(langName, language.getAD_Language());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue