public static LocaleWrapper findTranslationLocaleFromString ( final LocaleProvider localeProvider , final String localeString ) { if ( localeString == null ) return null ; final CollectionWrapper < LocaleWrapper > locales = localeProvider . getLocales ( ) ; for ( final LocaleWrapper locale : locales . getItems ( ) ) { if ( localeString . equals ( locale . getValue ( ) ) ) { return locale ; } } return null ; }
Finds the matching locale entity from a translation locale string .