From 710ddc11547c7d5f14011f7a5a24c5b888b50f49 Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Mon, 31 Mar 2014 16:44:30 +0000 Subject: langs.inc.php prepared for conversion of mognase to gettext --- langs.inc.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/langs.inc.php b/langs.inc.php index 5a358587e..f1b154b3c 100644 --- a/langs.inc.php +++ b/langs.inc.php @@ -451,12 +451,15 @@ function _lang_load($locale, $domain) { return i18n::_lang_load($locale, $domain */ function read_translation_file($locale, $name_of_translation) { - if($locale == 'en') { - $filename = $name_of_translation . '.pot'; + if($name_of_translation == '../_nav/langs/en') { + $path_filename = '/_nav/langs/' . $locale . '.po'; } else { - $filename = $name_of_translation . '.po'; + $path_filename = '/langs/' . $locale . '/' . $name_of_translation . '.po'; + } + if($locale == 'en') { + $path_filename .= 't'; } - return phpmo_parse_po_file(G_APP_ROOT . '/langs/' . $locale . '/' . $filename); + return phpmo_parse_po_file(G_APP_ROOT . $path_filename); } /** -- cgit v1.2.1