- Translations for the Sonar Core Platform: making the Sonar Core Platform available in a new language requires to develop and publish a new Language Pack plugin.
- By default Sonar embeds the English Pack.
- All other Language Pack plugins (like the French Pack plugin) are hosted in the Plugins Forge (https://svn.codehaus.org/sonar-plugins/trunk/l10n/), are maintained by the community and are available through Update Center (category "Localization").
- Translations for the Sonar Community Plugins: open-source plugins of the Sonar Community (hosted in the Plugins Forge) must embed only the bundles for the default locale. Translations will be done in the Language Pack plugins.
- Translations for other Plugins: closed-source/commercial/independant plugins must embed the bundles for the default locale and the translations for every language they want to support.
There are 2 two types of files for localized messages:
In the Java API, properties files are supposed to be encoded in ISO-8859 charset. Without good tooling, this can be quite annoying to write translation for languages that do not fit in this charset.
# localize dates or datetimes l(date_or_time)
GWT provides its own mechanisms to internationalize components. The static technique is the most efficient and must be used into Sonar GWT extensions. Read the Google documentation for more details.
org.sonar.api.i18n.I18n is available for server extensions. Batch extensions are not supported yet and can not load bundles.
How to handle a Language Pack
A Language Pack defines bundles for the Sonar Core Platform and for Sonar Community Plugins.
The easiest way to create a new pack is to copy the French Pack and to adapt it to your language.
- The English Pack - which contains all the bundles of the Sonar Core Platform that should be translated (you are not obliged to translate them all at once, you can proceed with baby steps)
- The following Sonar Community Plugins which support L10n (as of August 2012):
- Tab Metrics
- Useless Code Tracker
- Violation Density
- Widget Lab