Copyright © 2009-2020 Marc Worrell
Authors: Marc Worrell (marc@worrell.nl).
lookup/2 | Strict translation lookup of a language version. |
lookup/3 | |
lookup_fallback/2 | Non strict translation lookup of a language version. |
lookup_fallback/3 | |
lookup_fallback_language/2 | |
lookup_fallback_language/3 | |
parse_translations/1 | Prepare a translations table based on all .po files in the active modules. |
trans/2 | translate a string or trans record into another language. |
trans/3 | |
translations/2 | Fetch all translations for the given string. |
lookup(Trans::z:trans() | binary() | string(), Context::#context{}) -> binary() | string() | undefined
Strict translation lookup of a language version
lookup(Trans::z:trans() | binary() | string(), Lang::atom(), Context::#context{}) -> binary() | string() | undefined
lookup_fallback(Trans::z:trans() | binary() | string() | undefined, Context::z:context() | undefined) -> binary() | string() | undefined
Non strict translation lookup of a language version. In order check: requested language, default configured language, english, any
lookup_fallback(Trans, Lang, Context) -> any()
lookup_fallback_language(Langs::[atom()], Context::z:context()) -> atom()
lookup_fallback_language(Langs::[atom()], Lang::atom(), Context::z:context()) -> atom()
parse_translations(Context::z:context()) -> map()
Prepare a translations table based on all .po files in the active modules. Returns a map of english sentences with all their translations
trans(Trans::z:trans() | binary() | string(), Lang::z:context() | atom()) -> binary() | undefined
translate a string or trans record into another language
trans(Trans, Language, Context) -> any()
translations(Trans::z:trans() | binary() | string(), Context::z:context()) -> z:trans() | binary()
Fetch all translations for the given string.
Generated by EDoc