Interface MutableTranslationPackage

All Superinterfaces:
TranslationPackage
All Known Implementing Classes:
BasicTranslationPackage, DelegateTranslationPackage, DesignerLocalizationManager, TranslationPackageDiff

public interface MutableTranslationPackage extends TranslationPackage
  • Method Details

    • addTerm

      void addTerm(String key)
      Ensures that the specified key is in the translation package. This registers a key without necessarily providing a translation immediately.
      Parameters:
      key - The key to add.
    • addTranslation

      void addTranslation(String key, Locale locale, String value)
      Sets a translation for the specified key and locale.
      Parameters:
      key - The key to translate.
      locale - The target locale.
      value - The translated string.
    • removeTranslation

      void removeTranslation(String key, Locale locale)
      Removes a translation for a specified key and locale. Used when someone had a translation and blanks it out. This removes the specific translation but keeps the key in the package.
      Parameters:
      key - The key to modify.
      locale - The locale for which to remove the translation.
    • addTranslations

      void addTranslations(String key, TranslationMap translations)
      Sets all of the translations for a specific key. Translation map can be null, in which case the key will simply be registered in the index.
    • removeKey

      boolean removeKey(String key)
      Removes the specific key, and any translations.
      Returns:
      true if key was present
    • ensureLocaleExists

      void ensureLocaleExists(Locale locale)
      Verifies that the locale is present, adding it if necessary.
    • removeLocale

      void removeLocale(Locale locale)