Interface Translatable

All Known Subinterfaces:
AuthenticationChallenge

public interface Translatable
An object encapsulating some kind of localizable message. The object can be localized based on a set of preferred localizations, typically the list of locales specified by a HTTP Accept-Language Request Header.
Author:
cdivilly
  • Method Summary

    Modifier and Type
    Method
    Description
    toString(Iterable<Locale> localePreference)
    Translate a message to the most preferred available localization
    default String
    toString(Locale locale)
    Translate a message to a specific Locale
  • Method Details

    • toString

      String toString(Iterable<Locale> localePreference)
      Translate a message to the most preferred available localization
      Parameters:
      localePreference - ordered list of Locales from most preferred to least preferred
      Returns:
      The best available translation match
    • toString

      default String toString(Locale locale)
      Translate a message to a specific Locale
      Parameters:
      locale - The Locale to translate to
      Returns:
      The best available translation match