public Map < String , String > getAll ( final Locale locale ) { Map < String , String > ret = LANGS . get ( locale ) ; if ( null == ret ) { ret = new HashMap <> ( ) ; final ResourceBundle defaultLangBundle = ResourceBundle . getBundle ( Keys . LANGUAGE , Latkes . getLocale ( ) ) ; final Enumeration < String > defaultLangKeys = defaultLangBundle . getKeys ( ) ; while ( defaultLangKeys . hasMoreElements ( ) ) { final String key = defaultLangKeys . nextElement ( ) ; final String value = replaceVars ( defaultLangBundle . getString ( key ) ) ; ret . put ( key , value ) ; } final ResourceBundle langBundle = ResourceBundle . getBundle ( Keys . LANGUAGE , locale ) ; final Enumeration < String > langKeys = langBundle . getKeys ( ) ; while ( langKeys . hasMoreElements ( ) ) { final String key = langKeys . nextElement ( ) ; final String value = replaceVars ( langBundle . getString ( key ) ) ; ret . put ( key , value ) ; } LANGS . put ( locale , ret ) ; } return ret ; }
Gets all language properties as a map by the specified locale .