<
From version < 9.1 >
edited by Vincent Massol
on 2011/03/31
To version < 10.1 >
edited by Vincent Massol
on 2011/03/31
>
Change comment: There is no comment for this version

Summary

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 +

Get Connected