function list_all Retrieves an array of the Habari locales that are installed
static
array.
list_all
()
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.
static
boolean
load_pluggable_domain
(string $domain, string $base_dir)
-
string
$domain: the domain to load
-
string
$base_dir: the base directory in which to find the translation files
Sets the locale for Habari.
static
void
set
([string $locale = NULL])
-
string
$locale: A language code like 'en' or 'en-us' or 'x-klingon', will be lowercased
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@euro' (Linux) or 'DEU' (Windows), etc.
static
string
set_system_locale
(string... $locale)
-
string...
$locale: The locale(s) to set. They will be tried in order.
Echo a version of the string translated into the current locale
static
void
_e
(string $text, string $domain)
-
string
$text: The text to echo translated
-
string
$domain: (optional) The domain to search for the message
Return a singular or plural string translated into the current locale based on the count provided
static
string
_n
(string $singular, string $plural, string $count, [string $domain = 'habari'])
-
string
$singular: The singular form
-
string
$plural: The plural form
-
string
$count: The count
-
string
$domain: (optional) The domain to search for the message
Echo singular or plural version of the string, translated into the current locale, based on the count provided
static
void
_ne
(string $singular, string $plural, string $count, [string $domain = 'habari'])
-
string
$singular: The singular form
-
string
$plural: The plural form
-
string
$count: The count
-
string
$domain: (optional) The domain to search for the message
Return a version of the string translated into the current locale
static
string
_t
(string $text, [ $args = array()], [string $domain = 'habari'])
-
string
$text: The text to echo translated
-
string
$domain: (optional) The domain to search for the message
-
$args
DO NOT USE THIS FUNCTION.
This function is only to be used by the test case for the Locale class!
static
void
__run_loadfile_test
( $filename)
DO NOT USE THIS FUNCTION.
This function is only to be used by the test case for the Locale class!
static
void
__run_plural_test
( $header)