L10n Class Reference

Localization. More...

List of all members.

Public Member Functions

 setTranslation ($lang, $msgid, $msgstr)
 Set translation of text.
 tr ($msgid, $lang=null)
 Translate string to specified language.
 trMap ($lang=null)
 Return translation table for selected language.


Detailed Description

Localization.

L10n object maintain translation table. Local replacement of gettext library.

Definition at line 510 of file base.php.


Member Function Documentation

L10n::setTranslation ( lang,
msgid,
msgstr 
)

Set translation of text.

Parameters:
lang Target language, 'en' is english (default).
msgid ID of string to translate.
msgstr Translation text

Definition at line 518 of file base.php.

L10n::tr ( msgid,
lang = null 
)

Translate string to specified language.

Parameters:
msgid ID of string to translate.
lang Target language of desired translation. When no lang parametr given, LangSelect singleton will be asked.
Returns:
Return translated string if available or msgid if there is no suitable translation.

Definition at line 544 of file base.php.

References LangSelect::singleton().

Here is the call graph for this function:

L10n::trMap ( lang = null  ) 

Return translation table for selected language.

Parameters:
lang Target language of desired translation. When no lang parametr given, LangSelect singleton will be asked.
Returns:
Return associative array containing text translations.

Definition at line 531 of file base.php.

References LangSelect::singleton().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat Mar 8 10:26:44 2008 for Dudka.cz by  doxygen 1.5.4