Class TranslationMapStorageAndroid

java.lang.Object
com.transifex.common.TranslationMapStorage
com.transifex.txnative.TranslationMapStorageAndroid

public class TranslationMapStorageAndroid extends TranslationMapStorage
A class that extends TranslationMapStorage so that translations can be read from the application's Assets folder.

Translations can be bundled in your application's Assets folder, using the Transifex command-line tool.

See Also:
  • Field Details

    • TAG

      public static final String TAG
  • Constructor Details

  • Method Details

    • fromAssetsDirectory

      @Nullable public LocaleData.TranslationMap fromAssetsDirectory(@NonNull String srcDirectoryPath)
      Loads a LocaleData.TranslationMap from an application's Assets folder under the provided path.
      Parameters:
      srcDirectoryPath - The path to the directory containing translations in the expected format.
      Returns:
      The translation map or null if the directory isn't found or it's empty. If some locales fail to load, they won't be added in the returned map.