Interface TranslationServices

All Known Implementing Classes:
TranslatorXml

public interface TranslationServices
  • Method Summary

    Modifier and Type
    Method
    Description
    get a list of translation codes by category
    toStr(float value)
    localization for converting a decimal to language specific representation
    toStr(Date value)
    localization for converting a date to language specific representation
    translate(String context, String value)
    equivalent to the general translation operation, but the context that provides the transations specifies the target language
    translate(String context, String value, String targetLang)
    General translation functionality - given a string, translate it to a different language
    translateAndFormat(String contest, String lang, String string2, Object... args)
    General translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.
    Get a list of all translations available for a phrase
  • Method Details

    • translate

      String translate(String context, String value, String targetLang)
      General translation functionality - given a string, translate it to a different language
      Parameters:
      context - - for debugging purposes
      value - - the string to translate
      targetLang - - the target language to translate to.
      Returns:
      the translated string, or value if no translation is found
    • translateAndFormat

      String translateAndFormat(String contest, String lang, String string2, Object... args)
      General translation functionality - given a string, translate it to a different language, but also perform String.format on the outcome.
      Parameters:
      contest -
      lang -
      string2 -
      args -
      Returns:
    • translate

      String translate(String context, String value)
      equivalent to the general translation operation, but the context that provides the transations specifies the target language
      Parameters:
      context -
      value -
      Returns:
    • translations

      Get a list of all translations available for a phrase
      Parameters:
      value -
      Returns:
    • toStr

      String toStr(float value)
      localization for converting a decimal to language specific representation
      Parameters:
      value -
      Returns:
    • toStr

      String toStr(Date value)
      localization for converting a date to language specific representation
      Parameters:
      value -
      Returns:
    • listTranslations

      get a list of translation codes by category
      Parameters:
      category -
      Returns: