Sorry, I was a bit to quick ;-) What I meant is: $xwiki.renderText(Document.getTranslatedContent(language), Document)
On Wed, Feb 15, 2012 at 1:22 PM, Edo Beutler <ebeut...@synventis.com> wrote: > Hi Guillaume > > "Shooting from the hip" I suppose > $xwiki.renderText(Document.getTranslatedDocument().getContent(), > Document) should work. > > Regards > Edo > > On Wed, Feb 15, 2012 at 12:53 PM, Guillaume Delhumeau > <gdelhum...@xwiki.com> wrote: >> 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 >> users@xwiki.org >> http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users