Hi guys.

Let met describe you my problem.

I get the rendered content of a document on a velocity script :

#set($newsletterContent = $newsletterContentDoc.getRenderedContent())

But I would like to specify the language I want ('fr' or 'en') because my
document contains translation keys.

Of course, I tried to use Document.getTranslatedDocument() before rendering
it, but it doesn't work, maybe because my translated content is inside a
velocity script of the document.

The best way would be having a language parameter into getRenderedContent()
function but since we can't, is there an easy way to do it?

-- 

I also tried to do this :

#set($newsletterContent =
$xwiki.getURLContent($newsletterContentDoc.getExternalURL('get','outputSyntax=plain&language=fr')))

but it is very dirty and doesn't work since the wiki ask for credentials
when I do getURLContent().

--

Thx a lot.
Guillaume
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to