i18n documentation

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-21 22:32:52 +00:00
parent ba62ce9384
commit 2f18ed3e94
2 changed files with 26 additions and 2 deletions

View File

@ -26,4 +26,28 @@
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html
i18n management
i18n management
The js library {{{http://code.google.com/p/jquery-i18n-properties}jquery-i18n-properties}} is used for i18n.
On application loading, i18n properties are loaded by calling a REST services with the browser lang
or with the requested language specified by the request parameter : ?request_lang=en.
This service will load properties in this order:
* redback properties in en then in specified language
* archiva properties (from org/apache/archiva/i18n/default.properties) in en then in specified language
* Javascript method
You can use the "interpolation" mechanism in javascript too (sample for property managedrepository.deleted=Managed Repository " {0} " deleted. )
+-----------------------
Javascript code :
$.i18n.prop("managedrepository.deleted",managedRepository.name())
+-----------------------
* Missing properties
In case of missing property, the key is returned.

View File

@ -43,8 +43,8 @@
<item name="General Design" href="/index.html" />
<item name="Rest service" href="/rest.html"/>
<item name="JS Template loading" href="/template-loading.html"/>
<item name="Knockout Binding" href="/knockout-binding.html"/>
<item name="i18n" href="/i18n.html"/>
<item name="Knockout Binding" href="/knockout-binding.html"/>
<item name="Generic Javascipts" href="/generics-js"/>
</menu>