Skip to content

Localization functions

Kenneth Gulbrandsøy edited this page Aug 3, 2014 · 6 revisions

There are both single and plural forms of localization functions. So far, only the single version are in use. This could change in the future. For a complete reference of gettext functions, see PHP: Gettext Functions - Manual.

Important

In RescueMe, only the functions from php-gettext compatibility layer should be used to implement localization functions in RescueMe. These are all prefixed with T_. So if you want to localize using the compatible version of gettext(string $text) or _(string $text) from the gettext extension, use T_gettext(string $text) or T_(string $text) from the compatibility layer instead!

###Functions allowed in modules

Only use these functions to get localized strings in modules. Direct use of other localization functions could escape the control of Rescue locale implementation.

Function
set_system_locale() Set current domain and system locale
T_() Lookup a message in the current domain
T_locale() Lookup a message in given domain and locale

Clone this wiki locally