diff options
author | Andrew Dolgov <[email protected]> | 2007-03-06 07:11:28 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-03-06 07:11:28 +0100 |
commit | 709e7dc29bdfd104ea81f72607b77c46a84a0af9 (patch) | |
tree | 927f3c4f46eb0128b5e62593f5fadc81b4d68985 /localized_js.php | |
parent | 793185a9a51e3c5a104f4addb736b6372516d17e (diff) |
add gettext to js, bump translations
Diffstat (limited to 'localized_js.php')
-rw-r--r-- | localized_js.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/localized_js.php b/localized_js.php new file mode 100644 index 000000000..b46ba83b3 --- /dev/null +++ b/localized_js.php @@ -0,0 +1,26 @@ +<?php +require "functions.php"; +header("Content-Type: text/plain; charset=UTF-8"); + +function js_decl($s1, $s2) { + return "T_messages[\"$s1\"] = \"$s2\";\n"; +} +?> + +var T_messages = new Object(); + +function __(msg) { + if (T_messages[msg]) { + return T_messages[msg]; + } else { + return msg; + } +} + +<?php + +print js_decl("display feeds", __("display feeds")); +print js_decl("display tags", __("display tags")); + +?> + |