Difference between revisions of "Translations"
Line 7: | Line 7: | ||
==Working with the sources== | ==Working with the sources== | ||
− | If you have downloaded all BaseX sources via [[ | + | If you have downloaded all BaseX sources via [[Eclipse]] or [[Maven]], you may proceed as follows: |
All language files are placed in the <code>[https://github.com/BaseXdb/basex/tree/master/src/main/resources/lang src/main/resources/lang]</code> directory of the main project: | All language files are placed in the <code>[https://github.com/BaseXdb/basex/tree/master/src/main/resources/lang src/main/resources/lang]</code> directory of the main project: |
Revision as of 12:54, 11 December 2012
This page is part of the Developer Section. It describes how to translate BaseX into other (natural) languages.
BaseX is currently available in nine languages, namely Dutch, English, French, German, Italian, Indonesian, Japanese, Mongolian, and Romanian.
It is easy to translate BaseX into your native language! This is how you can proceed:
Working with the sources
If you have downloaded all BaseX sources via Eclipse or Maven, you may proceed as follows:
All language files are placed in the src/main/resources/lang
directory of the main project:
- Create a copy of an existing translation file (e.g.,
English.lang
) and rename it to your target language (e.g.Hawaiian.lang
) - Enter your name and contact information in the second line
- If you are using Eclipse, refresh the project (via Project → Refresh); if you are using Maven, type in
mvn compile
. Your new language file will be automatically detected. - Start the BaseX GUI, choose your language via Options → Preferences... and close the GUI
- Translate the texts in your language file and restart BaseX in order to see the changes
- Repeat the last step if you want to revise your translations
Updating BaseX.jar
You may directly add new languages to the JAR file. JAR files are nothing else than ZIP archives, and all language files are placed in the lang
directory int the JAR file:
- Unzip an existing translation file (e.g.,
English.lang
) and rename it to your target language (e.g.Hawaiian.lang
) - Enter your name and contact information in the second line and translate the texts
- Update your JAR file by copying the translated file into the zipped
lang
directory. Your new language file will be automatically detected. - Start BaseX.jar, choose your language via Options → Preferences... and restart BaseX to see the changes
You may also change the language in the .basex
configuration file,
which is placed in your home directory.
In order to see where the all text keys are used within BaseX, you may temporarily
set the LANGKEY option to true
.