diff options
author | Andrew Dolgov <[email protected]> | 2010-01-13 21:38:18 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-01-13 21:38:18 +0300 |
commit | 5eee1b4247922352b1eca819d9fc981e937e4a22 (patch) | |
tree | 3603485f8061c34011671118669d90922658cd85 | |
parent | 47179c0e888d27ff6deb100be9a97126a51fdeb4 (diff) |
localized_js: disable when translations are disabled in config.php
-rw-r--r-- | localized_js.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/localized_js.php b/localized_js.php index 5d443d4ab..0d66da575 100644 --- a/localized_js.php +++ b/localized_js.php @@ -30,13 +30,16 @@ function __(msg) { <?php - $l10n = _get_reader(); + if (ENABLE_TRANSLATIONS) { - for ($i = 0; $i < $l10n->total; $i++) { - $orig = $l10n->get_original_string($i); - $translation = __($orig); + $l10n = _get_reader(); - print T_js_decl($orig, $translation); + for ($i = 0; $i < $l10n->total; $i++) { + $orig = $l10n->get_original_string($i); + $translation = __($orig); + + print T_js_decl($orig, $translation); + } } ?> |