Classes

The following classes are available globally.

  • Translation processor which takes loaded translations and process them to make them regular translation objects that can be used for further work.

    See more

    Declaration

    Swift

    class LoadedTranslationsProcessor
  • Class uses NSRegularExpression internally and simplifies its usability.

    See more

    Declaration

    Swift

    final class Regex
  • Parser that parses expressions that contains regular expressions.

    See more

    Declaration

    Swift

    class RegexExpressionParser: ExpressionParser
  • Contains base expressions that matches every country.

    See more

    Declaration

    Swift

    class SharedBaseExpression: SharedExpressionProtocol
  • Used to load content from expressions.json file for specified language.

    See more

    Declaration

    Swift

    final class SharedExpressionsLoader
  • Swifternalization contains some built-in country-related shared expressions. Developer can create its own expressions in expressions.json file for base and preferred languages.

    The class is responsible for proper loading the built-in shared ones and those loaded from project’s files. It handles overriding of built-in and loads those from Base and preferred language version.

    It always load base expressions, then looking for language specific. If in Base are some expressions that overrides built-ins, that’s fine. The class adds developer’s custom expressions and adds only those of built-in that are not contained in the Base.

    The same is for preferred languages but also here what is important is that at first preferred language file expressions are loaded, then if something different is defined in Base it will be also loaded and then the built-in expression that differs.

    See more

    Declaration

    Swift

    class SharedExpressionsProcessor
  • This is the main class of Swifternalization library. It exposes methods that can be used to get localized strings.

    The framework uses json files and work with them. There are two types of files. First is expressions.json that contains shared expressions used among other localizable json files. The other files are files with translation for specific languages. Each file is just for one language. E.g. you can have base.json, en.json, pl.json which are accordingly used for Base, English and Polish localizations.

    Before calling any method that return localized string call configure:.

    See more

    Declaration

    Swift

    final public class Swifternalization
  • Class that gets dictionary of translations and turn it into LoadedTranslations.

    See more

    Declaration

    Swift

    final class TranslationsLoader