/** * Creates a new messages instance from the named resource that inherits the current messages. * * @param name the messages resource name * @return the messages */ @Override public Messages newMessages(String name) { Messages child = locales.getMessages(name); Messages result = new LocaleDatabase(this, locales); result.add(child); return result; }
/** * Add the contents of a custom langpack to the default langpack, if it exists. * * @param installData the install data to be used */ public static void addCustomLangpack(AutomatedInstallData installData, Locales locales) { // We try to load and add a custom langpack. try { installData.getMessages().add(locales.getMessages(Resources.CUSTOM_TRANSLATIONS_RESOURCE_NAME)); logger.fine("Found custom langpack for " + installData.getLocaleISO3()); } catch (ResourceNotFoundException exception) { logger.fine("No custom langpack for " + installData.getLocaleISO3() + " available"); } }