Interface ResourceBundle

    • Method Detail

      • getString

        String getString​(String key)
        Gets the Locale-specific translation identified by a given key. If a String is not defined in this bundle the call is forwarded to the parent bundle.
        Parameters:
        key - a key identifying a String
        Returns:
        the String identified by a key
      • getString

        default String getString​(String key,
                                 Map<String,​String> parameters)
        Gets the Locale-specific translation identified by a given key. If a String is not defined in this bundle the call is forwarded to the parent bundle.

        Variables in the Strings can be replaced by supplying parameters. The default definition of a variable is ${variableName}. If the label has only one variable use getString(String, String, String).

        Parameters:
        key - a key identifying a String
        parameters - a map of names and values to replace variables
        Returns:
        the String identified by a key with replaced variables
      • getString

        default String getString​(String key,
                                 String parameterName,
                                 String parameterValue)
        Gets the Locale-specific translation identified by a given key. If a String is not defined in this bundle the call is forwarded to the parent bundle.

        One variable in the String can be replaced by the parameterName and parameterValue. The default definition of a variable is ${variableName}. Convenience method for Strings with only one variable. If there are multiple variables use getString(String, Map).

        Parameters:
        key - a key identifying a String
        parameterName - the name of the variable as defined in the String
        parameterValue - the replacement value for the variable
        Returns:
        the String identified by a key with replaced variables
      • toJavaResourceBundle

        default ResourceBundle toJavaResourceBundle()