private static Locale forEN ( ) { if ( "en" . equalsIgnoreCase ( Locale . getDefault ( ) . getLanguage ( ) ) ) { return Locale . getDefault ( ) ; } Locale [ ] locales = Locale . getAvailableLocales ( ) ; for ( int i = 0 ; i != locales . length ; i ++ ) { if ( "en" . equalsIgnoreCase ( locales [ i ] . getLanguage ( ) ) ) { return locales [ i ] ; } } return Locale . getDefault ( ) ; }
The Legion of the Bouncy Castle Inc