Translation Wiki » Adding a new language

Adding a new language

Last modified by Evandro Fonseca on 2014/01/17 14:38

Adding a new language

There are two processes to add a new language, depending on if you want to submit an initial translation file (ApplicationResources) or if you want to start from scratch directly on l10n.xwiki.org.

Add new language

  1. Create a JIRA issue on http://jira.xwiki.org/browse/XINFRA to request adding a new language to http://l10n.xwiki.org.
  2. Once the team added the new language you can go on http://l10n.xwiki.org and start adding translations. You can either use key by key translation UI or import a whole translation file directly using batch import. Usually for a new language the batch import is used because there is a lot of keys and you will probably want to translate the whole thing and test it before putting it on http://l10n.xwiki.org. Note that importing at once so many translations can take a while so don't worry if your browser give you timeout error, the process still continue behind the scene (the UI need to be improved to get a nice progress bar etc.).

Translate and test an ApplicationResources file

For this you need to:

  1. Download the ApplicationResources file in english language. It's here for XE: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/resources/ApplicationResources.properties
  2. Translate it. Beware that you need to use special encoding for non ASCII chars and the file encoding has to be ISO 8859-1. You might want to lookup on the internet for tools to help you out for this, see Native2Ascii for example. To quickly test it you can do the following:
    • name you file based on the language (for example ApplicationResources_fr.properties for French)
    • place in into WEB-INF/classes folder
    • change the default language in the General section of your wiki administration

XWiki team only

Once it's committed the xwiki.org team will very probably do the following steps:

  1. Edit the main page of the application. For XE use: /xwiki/bin/inline/XE/WebHome.
  2. Add to the list of translation the language code at the end of the list of available languages ( ,fr for French).
    The language code is the standard format use in JAVA which mean <language code>_<COUNTRY CODE>.
  3. Save.
  4. [nice to have] Add the corresponding flag on Flags
  5. [nice to have] Add the corresponding pretty name on LocaleTranslations
Tags:
Created by Administrator on 2009/07/16 21:36

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 3.1 - Documentation