i18n management
The js library 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
Simple i18n value without any value
Javascript code : $.i18n.prop("save") will return the value for key save
You can pass some values too (sample for property managedrepository.deleted=Managed Repository " {0} " deleted. )
Javascript code : $.i18n.prop("managedrepository.deleted",managedRepository.name()) if managedRepository.name() is "foo" response will be Managed Repository " foo " deleted.
Missing properties
In case of missing property, the key is returned.