diff options
author | Evan Prodromou <evan@status.net> | 2009-12-22 08:53:50 -0800 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-12-22 08:53:50 -0800 |
commit | a2cb0a033fa6777d824dc40e759294287bd83939 (patch) | |
tree | 96b6947fd9aa7a76c1888a127e21e34319334f9b /lib/language.php | |
parent | f17016470170401e1ad1b869c740063a578cb4cd (diff) | |
parent | c9c316db7f003e018202e6c9f39770c208aecc05 (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/language.php')
-rw-r--r-- | lib/language.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/language.php b/lib/language.php index d8f529201..f5ee7fac5 100644 --- a/lib/language.php +++ b/lib/language.php @@ -32,6 +32,21 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +// Locale category constants are usually predefined, but may not be +// on some systems such as Win32. +$LC_CATEGORIES = array('LC_CTYPE', + 'LC_NUMERIC', + 'LC_TIME', + 'LC_COLLATE', + 'LC_MONETARY', + 'LC_MESSAGES', + 'LC_ALL'); +foreach ($LC_CATEGORIES as $key => $name) { + if (!defined($name)) { + define($name, $key); + } +} + if (!function_exists('gettext')) { require_once("php-gettext/gettext.inc"); } @@ -283,6 +298,7 @@ function get_all_languages() { 'en' => array('q' => 1, 'lang' => 'en', 'name' => 'English (US)', 'direction' => 'ltr'), 'es' => array('q' => 1, 'lang' => 'es', 'name' => 'Spanish', 'direction' => 'ltr'), 'fi' => array('q' => 1, 'lang' => 'fi', 'name' => 'Finnish', 'direction' => 'ltr'), + 'fa' => array('q' => 1, 'lang' => 'fa', 'name' => 'Persian', 'direction' => 'rtl'), 'fr-fr' => array('q' => 1, 'lang' => 'fr', 'name' => 'French', 'direction' => 'ltr'), 'ga' => array('q' => 0.5, 'lang' => 'ga', 'name' => 'Galician', 'direction' => 'ltr'), 'he' => array('q' => 0.5, 'lang' => 'he', 'name' => 'Hebrew', 'direction' => 'rtl'), |