Last modified by Simon Urli on 2023/10/10

From version 91.1
edited by Anca Luca
on 2016/05/03
Change comment: Added section about the translations for the macro
To version 92.1
edited by Vincent Massol
on 2016/09/29
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.lucaa
1 +XWiki.VincentMassol
Content
... ... @@ -4,6 +4,8 @@
4 4  
5 5  Wiki macros allow macro authors to develop reusable and distributable macro modules. There is no java code involved; hence no compiling or packaging. The macro author simply needs to create a wiki page according to a particular specification and that's all!
6 6  
7 +This page is a tutorial but you can also access the [[reference documentation for the Wiki Macro feature>>extensions:Extension.Wiki Macro Bridge Application]].
8 +
7 7  = Macro Visibility and Rights =
8 8  
9 9  There are 3 levels of visibility for a macro:
... ... @@ -94,8 +94,10 @@
94 94  {{hello greetUser="true"/}}
95 95  {{/code}}
96 96  
97 -== Translations ==
99 +== Translations ==
98 98  
101 +
102 +
99 99  When your macro is ready, you might want to provide the description of the macro and its parameters in different languages. For that, you need to create a set of translation keys and values (as described [[here>>DevGuide.InternationalizingApplications]]) and then just use the following convention for the keys you add in this storage (no modification is needed on the macro itself, the association of the translations to the macro is done based on a convention of the form of the translation keys):
100 100  
101 101  {{code}}
... ... @@ -114,7 +114,7 @@
114 114  rendering.macro.hello.name=Macro pour dire bonjour
115 115  rendering.macro.hello.description=Ceci est une macro qui va dire "Bonjour" a l'utilisateur
116 116  rendering.macro.hello.parameter.greetUser.name=Personnaliser le message
117 -rendering.macro.hello.parameter.greetUser.description=Personnaliser le message pour l'utilisateur courent en train de visualiser la page. Les valeurs possibles sont "true" (oui) et "false" (non).
121 +rendering.macro.hello.parameter.greetUser.description=Personnaliser le message pour l'utilisateur courant en train de visualiser la page. Les valeurs possibles sont "true" (oui) et "false" (non).
118 118  {{/code}}
119 119  
120 120  = WYSIWYG Access =

Get Connected