Static Public Member Functions | |
| static | set ($locale=null) |
| static | set_system_locale () |
| static | load_pluggable_domain ($domain, $base_dir) |
| static | list_all () |
| static | __run_plural_test ($header) |
| static | __run_loadfile_test ($filename) |
| static | _e () |
| static | _t ($text, $args=array(), $domain= 'habari') |
| static | _u ($text, $domain= 'habari') |
| static | _ne ($singular, $plural, $count, $domain= 'habari') |
| static | _n ($singular, $plural, $count, $domain= 'habari') |
Habari Locale Class
Provides translation services.
Definition at line 13 of file habarilocale.php.
| static HabariLocale::__run_loadfile_test | ( | $ | filename | ) | [static] |
DO NOT USE THIS FUNCTION. This function is only to be used by the test case for the Locale class!
Definition at line 277 of file habarilocale.php.
| static HabariLocale::__run_plural_test | ( | $ | header | ) | [static] |
DO NOT USE THIS FUNCTION. This function is only to be used by the test case for the Locale class!
Definition at line 262 of file habarilocale.php.
| static HabariLocale::_e | ( | ) | [static] |
Echo a version of the string translated into the current locale
| string | $text The text to echo translated | |
| string | $domain (optional) The domain to search for the message |
Definition at line 287 of file habarilocale.php.
| static HabariLocale::_n | ( | $ | singular, | |
| $ | plural, | |||
| $ | count, | |||
| $ | domain = 'habari' | |||
| ) | [static] |
Return a singular or plural string translated into the current locale based on the count provided
| string | $singular The singular form | |
| string | $plural The plural form | |
| string | $count The count | |
| string | $domain (optional) The domain to search for the message |
Definition at line 362 of file habarilocale.php.
Referenced by _ne().
| static HabariLocale::_ne | ( | $ | singular, | |
| $ | plural, | |||
| $ | count, | |||
| $ | domain = 'habari' | |||
| ) | [static] |
Echo singular or plural version of the string, translated into the current locale, based on the count provided
| string | $singular The singular form | |
| string | $plural The plural form | |
| string | $count The count | |
| string | $domain (optional) The domain to search for the message |
Definition at line 348 of file habarilocale.php.
| static HabariLocale::_t | ( | $ | text, | |
| $ | args = array(), |
|||
| $ | domain = 'habari' | |||
| ) | [static] |
Return a version of the string translated into the current locale
| string | $text The text to echo translated | |
| string | $domain (optional) The domain to search for the message |
Definition at line 300 of file habarilocale.php.
| static HabariLocale::_u | ( | $ | text, | |
| $ | domain = 'habari' | |||
| ) | [static] |
Given a string translated into the current locale, return the untranslated string.
| string | $text The translated string | |
| string | $domain (optional) The domain to search for the message |
Definition at line 328 of file habarilocale.php.
| static HabariLocale::list_all | ( | ) | [static] |
function list_all Retrieves an array of the Habari locales that are installed
Definition at line 107 of file habarilocale.php.
Referenced by InstallHandler::act_begin_install(), and AdminOptionsHandler::post_options().
| static HabariLocale::load_pluggable_domain | ( | $ | domain, | |
| $ | base_dir | |||
| ) | [static] |
Load translations for a given domain and base directory for a pluggable object. Translations are stored in gettext-style .mo files. The internal workings of the file format are not entirely meant to be understood.
Definition at line 66 of file habarilocale.php.
Referenced by Pluggable::load_text_domain().
| static HabariLocale::set | ( | $ | locale = null |
) | [static] |
Sets the locale for Habari.
| string | $locale A language code like 'en' or 'en-us' or 'x-klingon', will be lowercased |
Definition at line 25 of file habarilocale.php.
Referenced by InstallHandler::act_begin_install().
| static HabariLocale::set_system_locale | ( | ) | [static] |
Set system locale.
The problem is that every platform has its own way to designate a locale, so for German you could have 'de', 'de_DE', 'de_DE.UTF-8', 'de_DE.UTF-8' (Linux) or 'DEU' (Windows), etc.
| string... | $locale The locale(s) to set. They will be tried in order. |
Definition at line 47 of file habarilocale.php.
1.7.1