Hi all,
I suspect I’m doing something wrong but I can’t get my head around this scenario:
- Set a wiki as multinlingual with languages English (as default), and French.
- Create page “Sandbox.P1” with language=“en” and set its title to “P1 title”.
- Translate page to “fr” and set the the title to “P1 titre”.
- Execute the script below with parameter
language=en
in the URL:
{{velocity}}
#set ($reference = $services.model.resolveDocument('Sandbox.P1'))
#set ($referenceWithLocale = $services.model.createDocumentReference($reference, $xcontext.locale))
#set ($page = $xwiki.getDocument($referenceWithLocale))
$page.displayTitle
{{/velocity}}
I would expect the script displays “P1 title”, but I keep getting “P1” instead. Does anyone have an explanation for this behaviour? (when language=fr
is set in the URL, I get “P1 titre” as expected)
Cheers