z_trans (zotonic_core v1.0.0-rc.12)
Link to this section Summary
Functions
Strict translation lookup of a language version
Non strict translation lookup of a language version. In order check: requested language, default configured language, english, any
Prepare a translations table based on all .po files in the active modules. Returns a map of english sentences with all their translations
translate a string or trans record into another language
Fetch all translations for the given string.
Link to this section Functions
Link to this function
lookup(Trans, Context)
-spec lookup(z:trans() | binary() | string(), #context{}) -> binary() | string() | undefined.
Link to this function
lookup(Trans, Lang, Context)
-spec lookup(z:trans() | binary() | string(), atom(), #context{}) -> binary() | string() | undefined.
Link to this function
lookup_fallback(Trans, Context)
Link to this function
lookup_fallback(Trans, Lang, Context)
Link to this function
lookup_fallback_language(Langs, Context)
-spec lookup_fallback_language([atom()], z:context()) -> atom().
Link to this function
lookup_fallback_language(Langs, Lang, Context)
-spec lookup_fallback_language([atom()], atom(), z:context()) -> atom().
Link to this function
parse_translations(Context)
-spec parse_translations(z:context()) -> map().
Link to this function
trans(Trans, Lang)
Link to this function
trans(Trans, Language, Context)
Link to this function