Redefine SystemMesages after change language

Hi!

In the init () of application I change the text of system messages. (works great).

	
public void init ()
    {
		i18n.setCurrentLocale(new Locale("hu"));
		getSystemMessages();
		setMainWindow( new LoginWindow(i18n) );
    }

public static SystemMessages getSystemMessages() {
        CustomizedSystemMessages customizedMessages = new CustomizedSystemMessages();
            String orgHome = null;

         customizedMessages.setSessionExpiredNotificationEnabled(true);
         customizedMessages.setSessionExpiredCaption("Lejárt a bejelentkezési idő");
         customizedMessages.setSessionExpiredMessage("A nem mentett adatok elvesznek. Kattintson ide a folytatáshoz");

    return customizedMessages;
		
	}

Then the main window to give you the login window. Where the user can choose which language want to use the application. I would like to re-configure the system messages in the chosen language.


private void updateLabels() {
	languagelabel.setCaption(getI18N().getMessage("loginWindow.valasszonnyelvet"));
    	btnLogin.setCaption(getI18N().getMessage("loginWindow.gombBelepes"));
        group.setInputPrompt(getI18N().getMessage("loginWindow.csoport")); 
        login.setInputPrompt(getI18N().getMessage("loginWindow.belepesinev")); 
        password.setInputPrompt(getI18N().getMessage("loginWindow.jelszo")); 

	customizedMessages.setSessionExpiredNotificationEnabled(true);       
	customizedMessages.setSessionExpiredCaption(getI18N().getMessage("sm.sessionExpiredCaption"));
	customizedMessages.setSessionExpiredMessage(getI18N().getMessage("sm.sessionExpiredMessage"));
       
}

I could use some help on how I do this. If I run the above code here (loginwindow), not the init () of application, no error, but it does not take into account, remains the original message in English.

Thanks!