[Product-Developers] how to link to translated content (LinguaPlone) from a page template

Alexander Pilz pilz at syslab.com
Thu Mar 5 15:31:10 UTC 2009


If you know that your object is linguaplonish, it should be enough to do

<a tal:define="preflang here/portal_languages/getPreferredLanguage;
               disclaimer nocall:here/disclaimer;
               local_disclaimer python:disclaimer.getTranslation(preflang)"
    tal:attributes="href local_disclaimer/absolute_url"
    tal:content="local_disclaimer/Title" />

I would be interested in the reason why you consider your mentioned 
approach unacceptable :)

br
alex


Kees Hink schrieb:
> What is the right way to link from a page template to a content item, in
> such a way that the link shows in the user's language?
>
> The use case is a footer which has links to content items, so site managers can
> edit "Terms of service" (or similar site-wide documents) and its translations.
>
> I figured out one way to do it, but in many cases it will be unacceptable.
> http://plone.org/documentation/how-to/create-links-to-translated-content
>
> Thanks in advance for any hints, comments, etc.
>
> Kees
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>   

-- 
Alexander Pilz
SYSLAB.COM GmbH, Landwehrstrasse 60-62, 80336 Munich, Germany
http://www.syslab.com - Amtsgericht Muenchen, HRB 135057
Steuernummer 143/184/50154 - Ust.-ID: DE212842815 





More information about the Product-Developers mailing list