]> git.saurik.com Git - cydia.git/blob - MobileCydia.app/localize.js
Split cydia-lproj from main package.
[cydia.git] / MobileCydia.app / localize.js
1 document.addEventListener("DOMContentLoaded", function () {
2 var results = document.evaluate("//*[@localize]", document, null, XPathResult.ANY_TYPE, null);
3 var result, nodes = [];
4 while (result = results.iterateNext())
5 nodes.push(result);
6 for (var index in nodes) {
7 var node = nodes[index];
8 var key = node.getAttribute('localize');
9 var value = cydia.localize(key, node.innerHTML);
10 if (node.nodeName == 'TITLE')
11 document.title = value;
12 else
13 node.innerHTML = value;
14 }
15 });