summaryrefslogtreecommitdiff
path: root/localized_js.php
blob: b46ba83b3e25b53176446da205fd91072d9903f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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"));

?>