Adding a new language
Last modified by Thomas Mortagne on 2011/11/07 13:04
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
- Create a JIRA issue on http://jira.xwiki.org/jira/browse/XALOCALIZATION to request adding a new language to http://l10n.xwiki.org.
- 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:
- 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
- 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:
- Edit the main page of the application. For XE use: /xwiki/bin/inline/XE/WebHome.
- Add to the list of translation the language code at the end of the list of available languages ( ,fr for French).
- Save.
- [nice to have] Add the corresponding flag on Flags
- [nice to have] Add the corresponding pretty name on LocaleTranslations