public static Locale getLocale ( ) { String tag = Configuration . get ( "locale" ) ; if ( tag == null ) { return Locale . ROOT ; } else { String [ ] splittedTag = tag . split ( "_" , MAX_LOCALE_ARGUMENTS ) ; if ( splittedTag . length == 1 ) { return new Locale ( splittedTag [ 0 ] ) ; } else if ( splittedTag . length == 2 ) { return new Locale ( splittedTag [ 0 ] , splittedTag [ 1 ] ) ; } else { return new Locale ( splittedTag [ 0 ] , splittedTag [ 1 ] , splittedTag [ 2 ] ) ; } } }
Loads the locale from configuration .