public static String getMessage ( String key , String bundle ) { if ( ! messagesBundles . containsKey ( bundle ) ) { if ( Context . getLocale ( ) == null ) { messagesBundles . put ( bundle , ResourceBundle . getBundle ( "i18n/" + bundle , Locale . getDefault ( ) ) ) ; } else { messagesBundles . put ( bundle , ResourceBundle . getBundle ( "i18n/" + bundle , Context . getLocale ( ) ) ) ; } } return messagesBundles . get ( bundle ) . getString ( key ) ; }
Gets a message by key using the resources bundle given in parameters .