On 01/22/2014 08:50 PM, Paul Libbrecht wrote:
Hello fellow developers,
at curriki we are slowly evolving to xwiki 2.1 (finally!) and it is not too easy.
Some of our objects are rendering user-interfaces messages that are expressed in xwiki
syntax. To do so, they have the context.
But these objects are rendered sometimes in syntax 2.1 or syntax 1.0…
Is there a way to tell the "current" syntax in the context object?
thanks
paul
Hi Paul,
1. $doc.syntax [1]
2. Something useful:
#foreach($d in $xwiki.searchDocuments("where doc.syntaxId='xwiki/1.0' or
doc.syntaxId is null or doc.syntaxId = ''"))
* [[$d]]
#end
3. That is why translation messages should not contain wiki markup or
HTML code. See the paragraph starting with "Don't include markup in the
translation" at [2].
[1]
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/api/Docu…
[2]
http://dev.xwiki.org/xwiki/bin/Drafts/L10N+Conventions
--
Sergiu Dumitriu
http://purl.org/net/sergiu