Set as default language defined for client system (instead of defaulting to en_US) - http://kenai.com/jira/browse/HENGSIN-68
This commit is contained in:
parent
b45a2a6fb8
commit
067fc36957
|
@ -47,6 +47,7 @@ import org.adempiere.webui.util.BrowserToken;
|
|||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MSession;
|
||||
import org.compiere.model.MSystem;
|
||||
import org.compiere.model.MUser;
|
||||
|
@ -300,12 +301,12 @@ public class LoginPanel extends Window implements EventListener
|
|||
|
||||
chkRememberMe = new Checkbox(Msg.getMsg(Language.getBaseAD_Language(), "RememberMe"));
|
||||
|
||||
//set base language
|
||||
String baseLanguage = Language.getBaseLanguage().getName();
|
||||
// Make the default language the language of client System
|
||||
String defaultLanguage = MClient.get(ctx, 0).getAD_Language();
|
||||
for(int i = 0; i < lstLanguage.getItemCount(); i++)
|
||||
{
|
||||
Comboitem li = lstLanguage.getItemAtIndex(i);
|
||||
if(li.getLabel().equals(baseLanguage))
|
||||
if (li.getValue().equals(defaultLanguage))
|
||||
{
|
||||
lstLanguage.setSelectedIndex(i);
|
||||
languageChanged(li.getLabel());
|
||||
|
|
Loading…
Reference in New Issue