Interface TranslationBundle

    • Field Detail


        static final int DEFAULTPRIORITY
        The default priority of a Bundle.
        See Also:
        Constant Field Values
    • Method Detail

      • getId

        String getId()
        the unique identifier of the bundle
      • getPriority

        int getPriority()
        When searching for a translation, the bundles are searched in order until one of these bundles contains a value for the searched key. The bundle priority defines this order. Lower is better, meaning that a bundle with a smaller priority value will be searched before a bundle with a higher value.
        the priority
        See Also:
      • getTranslation

        Translation getTranslation​(String key,
                                   Locale locale)
        Return the translation for the given key, in the specified Locale. If not translation for the exact Locale can be found it fallback on the language and then on the default translation if any.
        key - the key to translate.
        locale - the locale to translate into.
        the Translation or null if none can be found.