Difference between revisions of "Translations"

From BaseX Documentation
Jump to navigation Jump to search
Line 7: Line 7:
 
# Unzip the source file <code>English.lang</code> and rename it to your target language (e.g. <code>Zulu.lang</code>)
 
# Unzip the source file <code>English.lang</code> and rename it to your target language (e.g. <code>Zulu.lang</code>)
 
# Enter your name and potential contact information in the second line and translate all texts
 
# Enter your name and potential contact information in the second line and translate all texts
# Update your JAR file by copying the translated file back to the <code>lang</code> directory. Your new language file will be automatically recognized.
+
# Update your JAR file by copying the translated file into the zipped <code>lang</code> directory. Your new language file will be automatically recognized.
 
# Start BaseX and choose your language in the GUI (''Options'' → ''Preferences...'')
 
# Start BaseX and choose your language in the GUI (''Options'' → ''Preferences...'')
 
# Restart BaseX to see the changes
 
# Restart BaseX to see the changes

Revision as of 13:37, 31 March 2011

BaseX is available in several languages (such as English, German, or Japanese). You can make us happy by contributing new translations! You may proceed as follows:

Using the JAR file

JAR files are nothing else than ZIP archives. All language files are placed in the lang directory inside the JAR file:

  1. Unzip the source file English.lang and rename it to your target language (e.g. Zulu.lang)
  2. Enter your name and potential contact information in the second line and translate all texts
  3. Update your JAR file by copying the translated file into the zipped lang directory. Your new language file will be automatically recognized.
  4. Start BaseX and choose your language in the GUI (OptionsPreferences...)
  5. Restart BaseX to see the changes

Using the sources

All language files are placed in the src/main/resources/lang directory of the main project:

  1. Create a copy of the source file English.lang and rename it to your target language (e.g. Zulu.lang)
  2. Enter your name and potential contact information in the second line and translate all texts
  3. Copy the translated file back to the lang directory. Your new language file will be automatically recognized.
  4. Recompile the project, start BaseX and choose your language in the GUI (OptionsPreferences...)
  5. Restart BaseX to see the changes

You may as well change the language in the .basex configuration file, which is placed in your home directory. To see where the texts are used within BaseX, we recommend you to also set the LANGKEY option to true.