My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToLocalize  
Brief instruction on how to localize this project.
Featured, Phase-Implementation
Updated Feb 4, 2010 by james...@gmail.com

Introduction

This page describes the method of localizing Google Gadgets for Linux into other languages.

Localize main program

All UI strings of Google Gadgets for Linux are stored in a XML file, named strings.xml, which has the exactly same format of gadget's strings.xml. Please refer to this document about the file format.

The original English strings are stored in resources/en/strings.xml file. The file content looks like:

<strings>

...

<!-- Decorated View toolbar back button tooltip. -->
<VD_BACK_BUTTON_TOOLTIP>Previous</VD_BACK_BUTTON_TOOLTIP>
<!-- Decorated View toolbar forward button tooltip. -->
<VD_FORWARD_BUTTON_TOOLTIP>Next</VD_FORWARD_BUTTON_TOOLTIP>
<!-- Decorated View toolbar toggle expanded view button tooltip. -->
<VD_POP_IN_OUT_BUTTON_TOOLTIP>Toggle Expanded View</VD_POP_IN_OUT_BUTTON_TOOLTIP>
<!-- Decorated View toolbar menu button tooltip. -->
<VD_MENU_BUTTON_TOOLTIP>Menu</VD_MENU_BUTTON_TOOLTIP>
<!-- Decorated View toolbar remove gadget button tooltip. -->
<VD_CLOSE_BUTTON_TOOLTIP>Remove</VD_CLOSE_BUTTON_TOOLTIP>

<!-- Tooltip text shown for the add gadgets button -->
<SIDEBAR_ADD_GADGETS_TOOLTIP>Add gadgets</SIDEBAR_ADD_GADGETS_TOOLTIP>
<SIDEBAR_MENU_BUTTON_TOOLTIP>Menu</SIDEBAR_MENU_BUTTON_TOOLTIP>
<SIDEBAR_MINIMIZE_BUTTON_TOOLTIP>Minimize</SIDEBAR_MINIMIZE_BUTTON_TOOLTIP>

...

</strings>

In order to localize Google Gadgets for Linux, you need:

  1. Create a sub-directory in resources for the new language, for example ja for Japanese, ko for Korean or zh-TW for Traditional Chinese. The name should be a language code defined in RFC1766.
  2. Copy resources/en/strings.xml to the new directory.
  3. Translate all strings defined in strings.xml into the new language. Be sure to keep elements name unchanged.
  4. Add the new strings.xml into Makefile.am, just like other files.
  5. Rebuild and install.

You may take resources/zh-CN/strings.xml as an example.

Localize built-in gadgets

Besides the main program, there are some builtin gadgets need localizing as well. The localization method is same.

Contribute your localization work to us

We'd very appreciate if you could contribute your localization work to us, so that other users will be benefited from it.

First of all, you may follow this instruction to become a contributor of this project. Then you may just send your localized strings.xml file to our dev maillist, or submit an issue and attach the file. Then we will merge it into our source code repository.

Comment by amoiz.sh...@gmail.com, Apr 3, 2011

i just want to know, is there a native language UI for Chinese peole already?


Sign in to add a comment
Powered by Google Project Hosting