Skip to topic | Skip to bottom
APS Sahaja Yoga
You are here: APS Sahaja Yoga > TWiki Web > TWikiI18NDotPm r1 - 11 Dec 2005 - 12:06 - TWikiGuest


Start of topic | Skip to actions

Package TWiki::I18N

Support for strings translation and language detection.

ClassMethod available_languages

Lists languages tags for languages available at TWiki installation. Returns a list containing the tags of the available languages.

Note: the languages available to users are determined in the configure interface.

ClassMethod get ($session)

Constructor. Gets the language object corresponding to the current user's language. 5B

ObjectMethod maketext ($text) -> $translation

Translates the given string (assumed to be written in English) into the current language, as detected in the constructor, and converts it into the site charset.

Wraps around Locale::Maketext's maketext method, adding charset conversion and checking

Return value: translated string, or the argument itself if no translation is found for thet argument.

ObjectMethod language () -> $language_tag

Indicates the language tag of the current user's language, as detected from the information sent by the browser. Returns the empty string if the language could not be determined.

ObjectMethod enabled_languages () -> %languages

Returns an array with language tags as keys and language (native) names as values, for all the languages enabled in this TWikiSite. Useful for listing available languages to the user.

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © 1993-2005 Associazione di Promozione Sociale "Sahaja Yoga" di Verona
http://www.sahajayogaverona.it - info@sahajayogaveronaPROTEZIONESPAMDACANCELLARE.it
Tel. 3476521542