Log In
or
Register
TWiki Web
Users
Groups
Index
Search
Changes
Notifications
Statistics
Preferences
User Reference
ATasteOfTWiki
TextFormattingRules
TWikiVariables
TWikiDocGraphics
TWikiSkinBrowser
InstalledPlugins
Admin Maintenance
AdminToolsCategory
InterWikis
ManagingWebs
TWikiSiteTools
TWikiPreferences
WebPreferences
Categories
Admin Documentation
Admin Tools
Developer Doc
User Documentation
User Tools
Webs
Main
Sandbox
TWiki
You are here:
FS
>
TWiki Web
>
TWikiI18NDotPm
r1 - 17 Dec 2005 - 13:33 -
TWikiContributor
E
dit
A
ttach
P
rintable
Start of topic |
Skip to actions
---+ Package =TWiki::I18N= Support for strings translation and language detection. %TOC% ---++ ClassMethod *available_languages* <tt></tt> 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* <tt>($session)</tt> Constructor. Gets the language object corresponding to the current user's language. 5B ---++ ObjectMethod *maketext* <tt>($text) -> $translation</tt> 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* <tt>() -> $language_tag</tt> 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* <tt>() -> %languages</tt> Returns an array with language tags as keys and language (native) names as values, for all the languages enabled in this TWiki.TWikiSite. Useful for listing available languages to the user.
End of topic
Skip to actions
|
Back to top
E
dit
|
A
ttach
|
P
rintable
|
R
aw view
|
Backlinks:
We
b
,
A
l
l webs
|
H
istory
: r1
|
M
ore topic actions
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding FS?
Send feedback