How to translate NetBeans IDE using OmegaT
This is the brief overview of how to do a translation of NetBeans IDE using the free OmegaT translation memory tool.
Before you start, you should read How to translate the Netbeans IDE. This mini how-to explains only how, using OmegaT, you can automate the process of translating a content of localizable files that compromise IDE user interface and help.
OmegaT is a small computer assisted translation tool with translation memory, not a machine translation tool. It aims at helping humans do the translation, but does not translate by itself. You should download the most recent version 1.6.0 RC8 from http://sf.net/projects/omegat/.
We will assume you have already followed the preparation steps described in How to translate the Netbeans IDE. If not, please setup your environment and download NetBeans sources now.
Some more preparation
Obtaining the sources to translate
In order to get localizable files only you should run the Ant
target "grab" on
ant grab from a command line would do the job.
This task collects all
files that can be localized in all modules into
Please be sure you clean
from whatever legacy things it contains -- run &guot;clean"
task on on
ant clean from a command line).
We encourage you to start from a small subset of modules, namely try
openide first – they contain mostly all the
core parts of NetBeans IDE UI.
Setting up OmegaT
After you install and start OmegaT, you need to create a
project somewhere. Create it and import the source files from
For example to translate
import these subdirectories.
In order to incorporate into translatedfiles project nicely,
you need to setup your project that way it outputs the translated files into
translatedfiles/src-todo. Go to
Project > Properties...
and choose the
directory for translated files.
Then you need some more setup of OmegaT to behave nicely
when translating HTML files that sometimes are there in NetBeans translation.
Options > File Filters...,
HTML and XHTML files and click
Now instead of what was written there before, you need to type
Target Filename Pattern.
That's because if you translate, for instance,
foo.html to French,
NetBeans would look for
OmegaT asks you to reload a project, and that's all with the setup.
If you already have some .properties translated
If you've already done some translation manually, you can
import it using small Java
.properties Import 1.2 tool. It creates a TMX file with all the
translations you've done memorized for reuse in OmegaT. Just put the produced
TMX file into a
/tm subdirectory of your OmegaT project
and reload the project using
Project > Reload.
Translation in OmegaT
That's pretty obvious, but what we'll do here is we'll show you an example.
First, search the project (
Edit > Search Project...) for a
&File – a file menu name – and then double-click on the (only)
search result to go there.
You are in a main OmegaT window, type there
as a translation of File menu name.
And create the translated files.
Now you need to go back and build NetBeans IDE in your language according to one of the how-tos at your disposal How to build Netbeans IDE in your own language on NetBeans or How to build Netbeans IDE in your own language.
After you build and run it, you should see NetBeans with a
"translated" file menu named
Author: Maxym Mykhalchuk
Last revision: 1.3 on 5th April, 2006