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