aboutsummaryrefslogtreecommitdiffstats
path: root/langs.inc.php
diff options
context:
space:
mode:
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);
}
/**