2010-01-13 12:11:16 +01:00
|
|
|
<?php
|
2012-12-09 10:41:22 +01:00
|
|
|
set_include_path(dirname(__FILE__) ."/include" . PATH_SEPARATOR .
|
|
|
|
get_include_path());
|
2011-12-11 20:59:25 +01:00
|
|
|
|
2013-03-25 09:34:53 +01:00
|
|
|
require_once "sessions.php";
|
|
|
|
require_once "functions.php";
|
2010-01-13 12:11:16 +01:00
|
|
|
header("Content-Type: text/plain; charset=UTF-8");
|
2011-03-18 17:25:06 +01:00
|
|
|
|
2010-01-13 12:11:16 +01:00
|
|
|
function T_js_decl($s1, $s2) {
|
|
|
|
if ($s1 && $s2) {
|
|
|
|
$s1 = preg_replace("/\n/", "", $s1);
|
|
|
|
$s2 = preg_replace("/\n/", "", $s2);
|
|
|
|
|
|
|
|
$s1 = preg_replace("/\"/", "\\\"", $s1);
|
|
|
|
$s2 = preg_replace("/\"/", "\\\"", $s2);
|
|
|
|
|
|
|
|
return "T_messages[\"$s1\"] = \"$s2\";\n";
|
|
|
|
}
|
|
|
|
}
|
2007-03-06 07:11:28 +01:00
|
|
|
?>
|
|
|
|
|
|
|
|
var T_messages = new Object();
|
|
|
|
|
|
|
|
function __(msg) {
|
|
|
|
if (T_messages[msg]) {
|
|
|
|
return T_messages[msg];
|
|
|
|
} else {
|
|
|
|
return msg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-03-24 17:08:18 +01:00
|
|
|
function ngettext(msg1, msg2, n) {
|
|
|
|
return (parseInt(n) > 1) ? msg2 : msg1;
|
|
|
|
}
|
|
|
|
|
2007-03-06 07:11:28 +01:00
|
|
|
<?php
|
2011-03-18 17:25:06 +01:00
|
|
|
$l10n = _get_reader();
|
2010-01-13 12:11:16 +01:00
|
|
|
|
2011-03-18 17:25:06 +01:00
|
|
|
for ($i = 0; $i < $l10n->total; $i++) {
|
|
|
|
$orig = $l10n->get_original_string($i);
|
|
|
|
$translation = __($orig);
|
2010-01-13 12:11:16 +01:00
|
|
|
|
2011-03-18 17:25:06 +01:00
|
|
|
print T_js_decl($orig, $translation);
|
2010-01-13 12:11:16 +01:00
|
|
|
}
|
2007-03-06 07:54:47 +01:00
|
|
|
?>
|