From: Olivier Lamy Date: Sat, 21 Jan 2012 22:32:52 +0000 (+0000) Subject: i18n documentation X-Git-Tag: archiva-1.4-M3~1519 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f18ed3e9406b07a47e933edb01e7d6949d95dfc;p=archiva.git i18n documentation git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1234432 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/i18n.apt b/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/i18n.apt index fc5f27c74..840b75acc 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/i18n.apt +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/site/apt/i18n.apt @@ -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 \ No newline at end of file +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. \ No newline at end of file diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/site/site.xml b/archiva-modules/archiva-web/archiva-webapp-js/src/site/site.xml index a435ec0ed..5414680c5 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/site/site.xml +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/site/site.xml @@ -43,8 +43,8 @@ - +