On Fri, Feb 17, 2012 at 6:05 PM,
<Ricardo.Julio.Rodriguez.Fernandez(a)sergas.es> wrote:
Hi!
_________________
> From: users-bounces(a)xwiki.org
[users-bounces(a)xwiki.org] On Behalf Of Marius Dumitru Florea
[mariusdumitru.florea(a)xwiki.com]
> Sent: 17 February 2012 08:30
> To: XWiki Users
> Subject: Re: [xwiki-users] getting translated title
> Hi Ricardo,
On Fri, Feb 17, 2012 at 2:35 AM,
<Ricardo.Julio.Rodriguez.Fernandez(a)sergas.es> wrote:
Hello,
Please, how could I get the title of a translated document to be used in a Velocity
script? Please, see an example:
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISAreaEndocrinology
Whatever language I select, group names are already show in Spanish even though group
names exist in all three languages. For instance...
atrium_km.idisantiago.es/bin/XWiki/XWikiIDISC01
> I don't see the problem. For both groups,
XWikiIDISAreaEndocrinology
> and XWikiIDISC01, the title changes when I change the language from
> the top right corner, below the search box. For
> XWikiIDISAreaEndocrinology I get: Endocrinology (en), Endocrinología
> (es) and Endocrinoloxía (gl). What exactly are you trying to achieve?
>
> Hope this helps,
> Marius
Yeap, no problem with this page: it shows the right title once you select any of the
three languages. BUT the name of the members appears always in Spanish (at least here)
even though there are translations for all three languages. For instance, check this
group...
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISC08?language=es
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISC08?language=gl
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISC08?language=en
This group is included in the meta-group XWikiIDISAreaEndocrinology...
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISAreaEndocrinology
But this page, the one showing all members of this area, shows its name always in Spanish
(at least here) even though I use the language switch...
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISAreaEndocrinology?langua…
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISAreaEndocrinology?langua…
http://atrium_km.idisantiago.es/bin/XWiki/XWikiIDISAreaEndocrinology?langua…
It is clear to me that the language switch affects only the contents of the "main
document" (in this case, XWiki/XWikiIDISAreaEndocrinology) and doesn't determine
what translation of each area is shown.
I've modified /templates/getgroupmembers.vm (XWiki Enterprise 2.4.30451) this way...
"member" : "$mdoc.title
#if($hasAdmin || $isAdvancedUser) (#if($wikiname !=
'local')$wikiname:#end$m)#end",
You could try to use
$mdoc.translatedDocument.title
or, if the language is not properly set on the XWiki context,
$mdoc.getTranslatedDocument($language).title
but for this you need to take the language from somewhere, a request
parameter probably.
Hope this helps,
Marius
I'm using $mdoc.title to show the title of each document instead of
$xwiki.getUserName($m, false). getUserName works fine of members of the group are users,
but it simply shows the name of the XWiki document when group members are other groups.
What I'm looking for is the way of "telling" getgroupmembers.vm that it
must show the title of a given document in the selected language.
I hope I've been clearer now and this issue is not only some more noise!!!!
Thanks you so much for your time and your help!
Ricardo
Thanks for your help!
Ricardo
--
Ricardo Rodríguez
Research Management and Promotion Technician
Health Research Institute of Santiago de Compostela (IDIS)
http://www.idisantiago.es
Nota: A información contida nesta mensaxe e os seus posibles documentos adxuntos é
privada e confidencial e está dirixida únicamente ó seu destinatario/a. Se vostede non é
o/a destinatario/a orixinal desta mensaxe, por favor elimínea. A distribución ou copia
desta mensaxe non está autorizada.
Nota: La información contenida en este mensaje y sus posibles documentos adjuntos es
privada y confidencial y está dirigida únicamente a su destinatario/a. Si usted no es
el/la destinatario/a original de este mensaje, por favor elimínelo. La distribución o
copia de este mensaje no está autorizada.
See more languages:
http://www.sergas.es/aviso_confidencialidad.htm
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
Nota: A información contida nesta mensaxe e os seus posibles documentos adxuntos é
privada e confidencial e está dirixida únicamente ó seu destinatario/a. Se vostede non é
o/a destinatario/a orixinal desta mensaxe, por favor elimínea. A distribución ou copia
desta mensaxe non está autorizada.
Nota: La información contenida en este mensaje y sus posibles documentos adjuntos es
privada y confidencial y está dirigida únicamente a su destinatario/a. Si usted no es
el/la destinatario/a original de este mensaje, por favor elimínelo. La distribución o
copia de este mensaje no está autorizada.
See more languages:
http://www.sergas.es/aviso_confidencialidad.htm
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users