Interface IProjectTranslationReader

All Known Implementing Classes:
ProjectTranslationReader

public interface IProjectTranslationReader
The reader allows to get single translation from the storage according to the order of project settings. This instance may register listeners to all storage segments listed in the read settings to get change notifications.
  • Method Details

    • getStoredTranslation

      @Nullable String getStoredTranslation(@NonNull TranslationKey key, @NonNull TranslateLanguage language, ITranslationStorageProvider.Storage.Type... storageTypes)
      Gets the stored translation with the project storage settings read order.
      Parameters:
      key - the key, cannot be null.
      language - the language, cannot be null.
      storageTypes - the storage types, can be null or empty array to get from all types of storages.
      Returns:
      the stored translation, can return null if not exist.
    • addValueChangedListener

      void addValueChangedListener(@NonNull IStorageValueChangedListener listener)
      Adds a listener for post value changes in all storages of the project. Has no effect if an identical listener is already registered.
      Parameters:
      listener - the listener
    • removeValueChangedListener

      void removeValueChangedListener(@NonNull IStorageValueChangedListener listener)
      Removes the given listener for post value changes from all storages of the project. Has no effect if an identical listener is not registered.
      Parameters:
      listener - the listener