Protocols

The following protocols are available globally.

  • A protocol for classes that act as cache for translations.

    See more

    Declaration

    Swift

    @objc
    public protocol TXCache
  • A protocol for classes that act as providers of cached translations (e.g. extracting them from a file)

    See more

    Declaration

    Swift

    @objc
    public protocol TXCacheProvider
  • Protocol that developers can use to create custom classes that return the current locale of the app. If no CurrentLocaleProvider is provided in TXLocaleState constructor, the TXPreferredLocaleProvider is used.

    See more

    Declaration

    Swift

    @objc
    public protocol TXCurrentLocaleProvider
  • Protocol that can be used to control all logging that occurs in the SDK

    See more

    Declaration

    Swift

    @objc
    public protocol TXLogHandler
  • A protocol for classes that determine what translation is returned when the requested translation is not available.

    Can be used in multiple cases, such as when the translation is not found.

    See more

    Declaration

    Swift

    @objc
    public protocol TXMissingPolicy
  • Defines an interface for error policy classes.

    Error policies define what happens when rendering faces an error. They are useful to protect the user from pages failing to load.

    See more

    Declaration

    Swift

    @objc
    public protocol TXErrorPolicy