Class I18n

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void setLocale​(java.util.Locale locale)
      Sets the locale used for translations.
      static java.lang.String tr​(java.lang.String key, java.lang.Object... arguments)
      Returns the translation for the given translation key and the supplied arguments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setLocale

        public static void setLocale​(java.util.Locale locale)
        Sets the locale used for translations.
        Parameters:
        locale - the locale
        See Also:
        ResourceBundle.getBundle(java.lang.String, java.util.Locale)
      • tr

        public static java.lang.String tr​(java.lang.String key,
                                          java.lang.Object... arguments)
        Returns the translation for the given translation key and the supplied arguments.
        Parameters:
        key - the translation key to fetch the translation
        arguments - the translation arguments which are used for formatting
        Returns:
        the translated string