View Single Post
Old 03-08-2010, 08:50 PM   #726
thawk
Connoisseur
thawk began at the beginning.
 
Posts: 57
Karma: 10
Join Date: Oct 2008
Device: prs 505
Post

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[
...
Attached Files
File Type: xml main.xml (76.8 KB, 455 views)

Last edited by thawk; 03-08-2010 at 08:57 PM.
thawk is offline   Reply With Quote