/** * Get the Language object for the given localized language name. * * @param languageName e.g. <code>English</code> or <code>German</code> (case is significant) * @return a Language object or <code>null</code> */ private Language getLanguageForLocalizedName(final String languageName) { for (final Language element : Language.REAL_LANGUAGES) { if (languageName.equals(element.getTranslatedName(messages))) { return element; } } return null; }
private Object[] getPossibleMotherTongues() { final List<Object> motherTongues = new ArrayList<>(); motherTongues.add(NO_MOTHER_TONGUE); for (final Language lang : Language.REAL_LANGUAGES) { motherTongues.add(lang.getTranslatedName(messages)); } return motherTongues.toArray(); }