aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-03-07 22:01:48 +0000
committerFilip Komar <filip@mageia.org>2014-03-07 22:01:48 +0000
commit42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c (patch)
tree7e10eef85c8b84006d19e900f1b95d180aa80a93 /langs.inc.php
parent51ff78de21924eb125b7fb0d8aace4fc43789253 (diff)
downloadwww-42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c.tar
www-42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c.tar.gz
www-42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c.tar.bz2
www-42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c.tar.xz
www-42fa789ce0ea2df5240c17e0ea35e2a1f1a6742c.zip
first steps as a preparation of l10n report (only diff.php for now - 3 exceptions) to gettext system
Diffstat (limited to 'langs.inc.php')
-rw-r--r--langs.inc.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/langs.inc.php b/langs.inc.php
index a30e44a24..5a358587e 100644
--- a/langs.inc.php
+++ b/langs.inc.php
@@ -2,6 +2,8 @@
/**
*/
+$g_app_root = realpath(dirname(__FILE__));
+define('G_APP_ROOT', $g_app_root);
define('G_VHOST', $_SERVER['SERVER_NAME']);
// languages for home
@@ -449,7 +451,12 @@ function _lang_load($locale, $domain) { return i18n::_lang_load($locale, $domain
*/
function read_translation_file($locale, $name_of_translation)
{
- return phpmo_parse_po_file(G_APP_ROOT . '/langs/' . $locale . '/' . $name_of_translation .'.po');
+ if($locale == 'en') {
+ $filename = $name_of_translation . '.pot';
+ } else {
+ $filename = $name_of_translation . '.po';
+ }
+ return phpmo_parse_po_file(G_APP_ROOT . '/langs/' . $locale . '/' . $filename);
}
/**