Module z_trans

Translate english sentences into other languages, following the GNU gettext principle.

Copyright 2009 Marc Worrell

Authors: Marc Worrell (marc@worrell.nl).

Description

Translate english sentences into other languages, following the GNU gettext principle.

Function Index

lookup/2Strict translation lookup of a language version.
lookup/3
lookup_fallback/2Non strict translation lookup of a language version.
lookup_fallback/3
lookup_fallback_language/2
lookup_fallback_language/3
parse_translations/1Prepare a translations table based on all .po files in the active modules.
trans/2translate a string or trans record into another language.
translations/2Fetch all translations for the given string.

Function Details

lookup/2

lookup(Trans::{trans, list()} | binary() | string(), Context::#context{}) -> binary() | string() | undefined

Strict translation lookup of a language version

lookup/3

lookup(Text::{trans, list()} | binary() | string(), Lang::atom(), Context::#context{}) -> binary() | string() | undefined

lookup_fallback/2

lookup_fallback(Trans::{trans, list()} | binary() | string(), Context::#context{}) -> binary() | string() | undefined

Non strict translation lookup of a language version. In order check: requested language, default configured language, english, any

lookup_fallback/3

lookup_fallback(Text, Lang, Context) -> any()

lookup_fallback_language/2

lookup_fallback_language(Langs::[atom()], Context::#context{}) -> atom()

lookup_fallback_language/3

lookup_fallback_language(Langs::[atom()], Lang::atom(), Context::#context{}) -> atom()

parse_translations/1

parse_translations(Context) -> any()

Prepare a translations table based on all .po files in the active modules.

trans/2

trans(Text::{trans, list()} | binary() | string(), Lang::#context{} | atom()) -> binary() | string() | undefined

translate a string or trans record into another language

translations/2

translations(Trans0::{trans, list()} | binary() | string(), Context::#context{}) -> {trans, list()} | binary()

Fetch all translations for the given string.


Generated by EDoc, Sep 29 2016, 17:16:16.