Last modified by Raphaƫl Jakse on 2022/03/17

<
From version < 1.13 >
edited by Vincent Massol
on 2007/10/19
To version < 1.14 >
edited by Fire
on 2007/11/21
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.Fire
Tags
... ... @@ -1,0 +1,1 @@
1 +tianlan
Content
... ... @@ -5,8 +5,8 @@
5 5  1.1 Using the static Resource Bundles
6 6  
7 7  * Stop your XWiki instance
8 -* Unjar the ~~WEB-INF/lib/xwiki-core-\*.jar~~ file in ~~WEB-INF/classes~~ and remove it from ~~WEB-INF/lib~~
9 -* Edit the ~~WEB-INF/classes/ApplicationResources*.properties~~ Resource Bundle files by adding the key/value pairs you need for your application.
8 +* Unjar the ~~WEB&#45;INF/lib/xwiki&#45;core&#45;\&#42;.jar~~ file in ~~WEB&#45;INF/classes~~ and remove it from ~~WEB&#45;INF/lib~~
9 +* Edit the ~~WEB&#45;INF/classes/ApplicationResources&#42;.properties~~ Resource Bundle files by adding the key/value pairs you need for your application.
10 10  * In your document, use the following to get the value associated with a key:
11 11  
12 12  {code}
... ... @@ -33,15 +33,12 @@
33 33  #info("To enable multiple languages you'll need to go to the Administration page and set MultiLingual to true and list the different languages you wish to use in the Languages field.")
34 34  
35 35  * Tell XWiki that your page is a Document Bundle by going to the Administration page, selecting the Advanced tab and entering it in the "Internationalization Document Bundles" field. You can specify several pages, separated by commas.
36 -
37 37  * Alternatively you can also specify the list of Internationalization Document Bundles in ~~xwiki.cfg~~ under the key ~~xwiki.documentBundles~~.
38 -
39 39  * On the page where you want to use the internationalized message, use:
40 40  
41 41  {code}
42 42  $msg.get("key")
43 -$msg.get("key", ["param1", "param2", ...])
41 +$msg.get("key", &#91;"param1", "param2", ...&#93;)
44 44  {code}
45 45  
46 46  where ~~key~~ is the key for the message to retrieve. Parameters can also be passed as is shown in the second syntax above.
47 -

Get Connected