source: branches/2.2/jabberit_messenger/java_source/src/docs/README.I18N @ 3102

Revision 3102, 3.3 KB checked in by amuller, 14 years ago (diff)

Ticket #986 - Efetuado merge para o Branch 2.2( atualizacao do modulo)

  • Property svn:executable set to *
Line 
1Jeti supports I18N using the native Java classes for this. The translations are stored in standard "properties" resources bundles. You can either convert this .properties files to .po (POT format) files and work with a GNU Gettext toolchain or work directly with the .properties files.
2
3If you decide to work directly with the .properties file, just open the base translation file (jeti.properties) with your favorite text editor (Ultraedit or Bluefish are my personal favorites), or a specialized tool, and translate the strings wich appear after the = sign. You must be careful: Java's resources bundles requires all the Unicode stuff to be coded, so you'll need to use some tool to work with the resuorce bundle format (there are some tools for this, see below) or code the strings by hand! Shocked
4
5On the other hand, if you prefer to work with POT files (.po), then convert the .properties to .mo and then to .po; then you can use a tool to edit the file (see below for tools), then make the .mo file and convert the .mo back to .properties. Maybe this sounds too complicated, but GNU Gettext suite provides useful tools for this task (man msgfmt and man msgunfmt).
6
7Please note that the keys of the resources have a format. This is, the window.string with spaces replaced by underscores. All shourtcut keys are indicated by the "standard" ampersand & symbol before the key. The I18N classes take care of managing this internally.
8
9The translations files should be named as:
10
11jeti_XX.properties for the main Jeti translation.
12plugins_XX.properties for the plugins translations.
13
14where XX is the two character code for your language, following the ISO standard (please see http://lcweb.loc.gov/standards/iso639-2/langcodes.html).
15
16Then, please submit your translation to Eric or to Equinoxe (see profiles) so it can be commited to CVS (you should always try to translate the CVS version of the properties files Smile ). Of course, if you plan to use the jar distribution from Jeti's site, then you should translate the .properties which come with that distribution.
17
18Tools:
19
20- Resource Bundle Editor https://resourcebundleeditor.dev.java.net/, a free editor for Java's resource bundles. Highly recommended for the Java approach.
21- Eclipse with some plugin for resource bundles edition.
22
23- poEdit http://poedit.sourceforge.net/ is a very good POT editor with the nice feature of remembering previous translations. Highly recommended for the GNU approach.
24- GNU Gettext http://www.gnu.org/software/gettext/ is the GNU's software for I18N.
25- Bluefish http://bluefish.openoffice.nl/ is a nice free programing editor.
26
27Here are some more programs to translate Jeti
28
29http://ostermiller.org/attesoro/similar.html
30
31I use the second one on that site:
32http://www.solyp.com/binaries/2975/babelfish.zip
33
34Please don't use the zaval resource editor, it can't handle the : that are in some keys leading to untranslated entries. further it doesn't warn you when there are untranslated entries, it just fills them in with the default text on save.
35
36
37Just open the jeti.properties or the plugins.properties,(you find them in the language directory of jeti) add a language (in the file menu) and start translating. It is not very difficult this way, just typing the right translation Smile
38
39Finally, this is a good start for I18N in Java: http://www.joconner.com/javai18n/
40
Note: See TracBrowser for help on using the repository browser.