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
-
... ... @@ -25,7 +25,7 @@ 25 25 {code} 26 26 greeting=hello 27 27 welcome=Welcome 28 -withparams=I can \{0\} pass\{1\}\{2\} params too using the Java MessageFormat syntax28 +withparams=I can {0} pass {1} {2} params too using the Java MessageFormat syntax 29 29 {code} 30 30 31 31 * Do the same for all the translations you want. ... ... @@ -39,8 +39,8 @@ 39 39 * On the page where you want to use the internationalized message, use: 40 40 41 41 {code} 42 - \$msg.get("key")43 - \$msg\.get\("key",\[\"param1\",\"param2\",\.\.\.\])42 +$msg.get("key") 43 +$msg.get("key", ["param1", "param2", ...]) 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.