vibe.web.i18n

Internationalization/translation support for the web interface module.

Members

Functions

determineLanguage
string determineLanguage(HTTPServerRequest req)
Undocumented in source. Be warned that the author may not have intended to support it.
determineLanguageByHeader
string determineLanguageByHeader(string accept_language, T allowed_languages)
string determineLanguageByHeader(string accept_language, Tuple allowed_languages)
string determineLanguageByHeader(HTTPServerRequest req, T allowed_languages)
string determineLanguageByHeader(HTTPServerRequest req, Tuple allowed_languages)

Determines a language code from the value of a header string.

extractDeclStrings
LangComponents extractDeclStrings(string text)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixin templates

translationModule
mixintemplate translationModule(string FILENAME)

Makes a set of PO files available to a web interface class.

Properties

translationContext
TranslationContextAttribute!CONTEXT translationContext [@property getter]

Annotates an interface method or class with translation information.

Structs

TranslationContextAttribute
struct TranslationContextAttribute(CONTEXT)
Undocumented in source.

Templates

GetTranslationContext
template GetTranslationContext(alias METHOD)
Undocumented in source.
languageSeq
template languageSeq(CTX)
Undocumented in source.
tr
template tr(CTX, string LANG)

Performs the string translation for a statically given language.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.

Authors

Sönke Ludwig