Changes for page Writing Internationalized XWiki Applications
Last modified by Raphaƫl Jakse on 2022/03/17
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -6,25 +6,8 @@ 6 6 7 7 * [[Tutorial for Internationalizing a Form>>DevGuide.TranslationsTutorial]] 8 8 9 -= Using the static Resource Bundles = 10 - 11 -* Stop your XWiki instance 12 -* Unjar the ##WEB-INF/lib/xwiki-core-*.jar## file (it was named ##xwiki.jar## in old versions) in ##WEB-INF/classes## and remove it from ##WEB-INF/lib## 13 -* Edit the ##WEB-INF/classes/ApplicationResources*.properties## Resource Bundle files by adding the key/value pairs you need for your application. 14 -* In your document, use the following to get the value associated with a key:((( 15 -{{code language="none"}} 16 -$msg.get("key") 17 -{{/code}} 18 - 19 -This will get the value from the Resource Bundle corresponding to the current language you are using in XWiki. 20 -))) 21 - 22 22 = Using properties located in XWiki pages = 23 23 24 -{{warning}} 25 -The features described below are only available in XWiki 1.0 Beta 4 and above. The ability to parametrize the resource string is available only in XWiki 1.0 Beta 5 and above. 26 -{{/warning}} 27 - 28 28 * Create a page that will host your key/value pairs. 29 29 * Enter all the key/value pairs in that page ({{warning}}use the wiki editor{{/warning}}). For example:((( 30 30 {{code language="none"}} ... ... @@ -72,3 +72,17 @@ 72 72 #end 73 73 {{/code}} 74 74 ))) 58 + 59 += Using the static Resource Bundles = 60 + 61 +* Stop your XWiki instance 62 +* Extract the ##ApplicationResources*.properties## file for your language from the ##WEB-INF/lib/xwiki-core-*.jar## file and put them in your ##WEB-INF/classes## directory. 63 +* Edit these properties file and add/modify the key/value pairs you need for your application. 64 +* In your document, use the following to get the value associated with a key:((( 65 +{{code language="none"}} 66 +$msg.get("key") 67 +{{/code}} 68 + 69 +This will get the value from the Resource Bundle corresponding to the current language you are using in XWiki. 70 +))) 71 +