We use main.xml to translate strings (PRS+ and original) into Chinese, using getTitle()/getValie() function. I hope it will be helpful for you.
If you have decided how to do localization, I have the Chinese translations and can be modified to the format you need.
Code:
<group id="MENU_GROUP" left="0" right="0" top="0" bottom="0">
<kbookMenu id="MENU" left="0" right="0" top="0" bottom="30" href="x-id://tableData">
<code>
<function id="getTitle"><![CDATA[
var strings = {
// Keys
"Volume-" : "音量-",
"Hold Volume-" : "长按音量-",
...
};
var result = arguments.callee.grammar.call(this);
var text="";
if (strings[result])
{
return strings[result];
}
return result;
]]></function>
<function id="getValue" params="record, field"><![CDATA[
...