Class LocaleData.TranslationMap

java.lang.Object
com.transifex.common.LocaleData.TranslationMap
Enclosing class:
LocaleData

public static class LocaleData.TranslationMap extends Object
A class that holds translations for multiple locales. It maps locale codes to LocaleData.LocaleStrings objects.
  • Constructor Details

    • TranslationMap

      public TranslationMap(int initialCapacity)
      Constructs an empty TranslationMap with the specified initial capacity.
      Parameters:
      initialCapacity - The initial capacity. Set to the number of expected locales.
    • TranslationMap

      public TranslationMap(@NonNull HashMap<String,LocaleData.LocaleStrings> map)
      Creates a TranslationMap object which uses the provided HashMap.

      The HashMap should map locale codes to LocaleData.LocaleStrings like this:

       {
          'fr' : LocaleStrings,
          'de' : LocaleStrings,
          'el' : LocaleStrings,
       }
       
    • TranslationMap

      public TranslationMap(@NonNull LocaleData.TranslationMap translationMap)
      Creates a new TranslationMap object by making a copy of the provided one.
  • Method Details