@Override public String localize(HumanReadableText text, Locales locales) { String result; if (text == null) { result = null; } else { //FIXME implement the locale selection final Locale chosenLocale = Locale.US; //FIXME implement the localized value lookup depending on chosenLocale result = text.getDefaultValue(); Object[] params = text.getParameters(); if (params != null && params.length > 0) { MessageFormat messageFormat = new MessageFormat(result, chosenLocale); result = messageFormat.format(params); } } return result; }
/** * @see Localizer#localize(HumanReadableText, Locales) */ public String localize(HumanReadableText text, Locales locales) { String result; if (text == null) { result = null; } else { //FIXME implement the locale selection final Locale chosenLocale = Locale.US; //FIXME implement the localized value lookup depending on chosenLocale result = text.getDefaultValue(); Object[] params = text.getParameters(); if (params != null && params.length > 0) { MessageFormat messageFormat = new MessageFormat(result, chosenLocale); result = messageFormat.format(params); } } return result; }