/** * Sets the selected locale on the installation data. * * @param code the locale ISO code */ public void propagateLocale(String code) { try { locales.setLocale(code); Locale newLocale = locales.getLocale(); Locale.setDefault(newLocale); installData.setLocale(locales.getLocale(), locales.getISOCode()); installData.setMessages(locales.getMessages()); AbstractInstallDataProvider.addCustomLangpack(installData, locales); } catch (Exception exception) { logger.log(Level.SEVERE, exception.getMessage(), exception); } } }
/** * Sets the selected locale on the installation data. * * @param code the locale ISO code */ public void propagateLocale(String code) { try { locales.setLocale(code); Locale newLocale = locales.getLocale(); Locale.setDefault(newLocale); JComponent.setDefaultLocale(newLocale); SwingUtilities.updateComponentTreeUI(this); installData.setLocale(locales.getLocale(), locales.getISOCode()); installData.setMessages(locales.getMessages()); AbstractInstallDataProvider.addCustomLangpack(installData, locales); // Configure buttons after locale has been loaded installData.configureGuiButtons(); } catch (Exception exception) { logger.log(Level.SEVERE, exception.getMessage(), exception); } }
/** * Load a default locale in the installData * * @param installData the installation data * @param locales the supported locales * @throws IOException for any I/O error */ protected void loadDefaultLocale(AutomatedInstallData installData, Locales locales) { Locale locale = locales.getLocale(); if (locale != null) { installData.setInstallationRecord(new XMLElementImpl("AutomatedInstallation")); installData.setLocale(locale, locales.getISOCode()); installData.setMessages(locales.getMessages()); } }
installData.setLocale(locales.getLocale(), locales.getISOCode()); installData.setMediaPath(mediaPath);