Hi Youcef, I can't really help you with your language issue, but I can give some indications on the different contexts. From Velocity : $context is the com.xpn.xwiki.api.Context class. It correspond to the request context exposed to xwiki users. $context.context (or $context.getContext()) is the com.xpn.xwiki.XWikiContext. That is the context not wrapped by the Api. Both class have more or less same methods exposed, but for most usages, you should use the $context. You may want also to be aware that contexts have a lifespan of one request. Cheers, Jérôme On 4/13/07, Youcef BEY <[email protected]> wrote:
Hi All,
I would like whether someone help me on how to set the language or change the default document language with "Groovy". In some situations, when creating some of documents I don't need to specify language even language of content is different of that indicated on the top.
Now for some documents, I need to create documents for which default language is different from that of XWiki.
In fact, I tried to invoke 'XWikiContext.setLanguage("language")' but it seems that "saveDocument()" method don't work with "XWikiContext". I would like also to understand difference between "XWikiContext", " context.context" and "xwiki.api.Context"? If before saving any document we need to specify the "context" then how to modify this context. There are less methods are available for tuning this contex (I mean " context.context").
Many thanks in advance.
Youcef
-- You receive this message as a subscriber of the [email protected] list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Jerome Velociter Mobile : 0033 (0) 617 260 654 GTalk, MSN : [email protected] Skype : jerome.velociter