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

default_language/1Return the configured default language for this server.
is_language/1check if the two letter code is a valid language.
language_list/1Return the list of languages selected for this site.
lc2/1Translate a language to an atom, fail when unknown language.
lc2descr/1Return a descriptive (english) string for the language.
lookup/2Strict translation lookup of a language version.
lookup/3
lookup_fallback/2Non strict translation lookup of a language version.
lookup_fallback/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

default_language/1

default_language(Context) -> any()

Return the configured default language for this server

is_language/1

is_language(LanguageString) -> bool()

check if the two letter code is a valid language

language_list/1

language_list(Context) -> any()

Return the list of languages selected for this site

lc2/1

lc2(LanguageString) -> Language

Translate a language to an atom, fail when unknown language

lc2descr/1

lc2descr(Language) -> Descr

Return a descriptive (english) string for the language

lookup/2

lookup(Trans, Context) -> any()

Strict translation lookup of a language version

lookup/3

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

lookup_fallback/2

lookup_fallback(Trans, Context) -> any()

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()

parse_translations/1

parse_translations(Context) -> any()

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

trans/2

trans(Text::From, Lang::Language) -> String

translate a string or trans record into another language

translations/2

translations(Trans0::From, Context) -> #trans{} | binary()

Fetch all translations for the given string.


Generated by EDoc, Feb 25 2011, 21:14:42.