Difference between revisions of "How to translate OpenJUMP into another language"

From OpenJUMP Wiki
Jump to navigation Jump to search
Line 1: Line 1:
== A - The steps on how to translate OpenJUMP ==
+
=== '''The steps on how to translate OpenJUM'''P ===
  
 
This in an ''example for'' translation into ''Brazilian Portugese''.
 
This in an ''example for'' translation into ''Brazilian Portugese''.
Line 33: Line 33:
 
After adding it, the nightly built of the next day should include your Portugese translation. I hope that is detailed enough :o) If questions appear please don't hesitate to contact me (Stefan/sstein)
 
After adding it, the nightly built of the next day should include your Portugese translation. I hope that is detailed enough :o) If questions appear please don't hesitate to contact me (Stefan/sstein)
  
== B - On new translations ==
+
=== '''On new translations''' ===
  
 
* please simply make a copy of the file jump_en.properties file and rename the copy to your language abbreviation (e.g. the swedish one should be like: jump_se.properties)
 
* please simply make a copy of the file jump_en.properties file and rename the copy to your language abbreviation (e.g. the swedish one should be like: jump_se.properties)
Line 39: Line 39:
 
* put it as additional file in the zip as describe above
 
* put it as additional file in the zip as describe above
  
== C - Useful tools ==
+
=== '''Useful tools''' ===
  
 
* some of the developers use the prb-editor for translatiion http://prbeditor.dev.java.net/
 
* some of the developers use the prb-editor for translatiion http://prbeditor.dev.java.net/
 +
 +
=== '''Translation of language such as Chinese, Vietnamese, Japanese etc.''' ===
 +
 +
an example for chinese translations:
 +
 +
# Use an editor (notepad or notepad++) to do the translation and save it as utf-8 format.
 +
# Convert the utf-8 to unicode using native2ascii.exe, e.g. <pre>C:\>native2ascii -encoding utf8 c:\jump_zh_HK c:\jump_zh_HKe </pre>
 +
# Use the jump_zh_HKe file
 +
 +
However, characters such as chinese may not be shown properly in the splash image.

Revision as of 17:53, 2 October 2010

The steps on how to translate OpenJUMP

This in an example for translation into Brazilian Portugese. People interests in creating a new language file my read part B (below) as well

  • 1) download the last nightly built from http://jump-pilot.sourceforge.net/download/nightlybuild/
  • 2) unpack it
  • 3) if you work on Windows:
    • set in the file YOUR_openjump_folder\bin\openjump.bat the i18n option to portugese language in the "start javaw" line:
    • eg. start javaw -Dlog4j.configuration=file:./log4j.xml -Xms256M -Xmx256M -cp %CLASSPATH% com.vividsolutions.jump.workbench.JUMPWorkbench -properties workbench-properties.xml -i18n pt_BR -plug-in-directory %LIB%/ext
    • otherwise modify the appropriate .sh file
  • 4) go to the file: YOUR_openjump_folder\lib\jump-workbench-2007XXXX-XXXX.jar (where xxx are nightly built specific number)
  • 5) for safety reasons make a copy of the file to some other place
  • 6) rename the .jar file to .zip
  • 7) unpack it somewhere
  • 8) look in the unpacked files for folder called "language" and a file called "jump_pt_BR.properties"
  • 9) open the file with your favorite editor and translate the strings:
    • you will see that on left side is an identifier string while on the side of the "=" equal sign is the translated text
    • a hint: new strings have a date line just before like [sstein 7 march 2007]
  • 10) after you have translated, safe the jump_pt_BR.properties file

note: the following steps are useful if you want to check your translation in OpenJUMP;

  • 11) pack all the stuff of the previously extracted zip file to a new .zip which has the same name as the old
  • 12) rename the just packed file .zip to .jar
  • 13) copy it in the same location as the old .jar (means the \lib\ folder)
  • 14) start openjump with the openjump.bat file and check your translation

if you dont want to test:

  • 15) if you finished your translation send me the jump_pt_BR.properties file (sstein@geo....) and i will add it to our sourcecode repository.

After adding it, the nightly built of the next day should include your Portugese translation. I hope that is detailed enough :o) If questions appear please don't hesitate to contact me (Stefan/sstein)

On new translations

  • please simply make a copy of the file jump_en.properties file and rename the copy to your language abbreviation (e.g. the swedish one should be like: jump_se.properties)
  • translate everything
  • put it as additional file in the zip as describe above

Useful tools

Translation of language such as Chinese, Vietnamese, Japanese etc.

an example for chinese translations:

  1. Use an editor (notepad or notepad++) to do the translation and save it as utf-8 format.
  2. Convert the utf-8 to unicode using native2ascii.exe, e.g.
    C:\>native2ascii -encoding utf8 c:\jump_zh_HK c:\jump_zh_HKe 
  3. Use the jump_zh_HKe file

However, characters such as chinese may not be shown properly in the splash image.