[Zope-dev] i18n:translate - problem

Bernd Dorn zope-mailinglist at mopa.at
Tue Dec 21 13:31:54 EST 2004


Krzysztof Kubacki wrote:
> Hi,
>  
> I have the Zope 2.7.0 instaled under Linux OS.
> I want to have my website in many languages in one Plone site. So I have 
> installed "Placeless Translation Service". I've made 2 .po files 
> (cms_pl.po, cms_en.po) and compiled to .mo files (cms_pl.mo, cms_en.mo).
> I want to change website language version based on varriable value in 
> ZPT and this is the problem (I think).
>  
> When I do .po files with the same domain, e.g: "Domain: CMS\n" and they 
> have different "Language-Code:" header e.g: "Language-Code: pl\n" and 
> "Language-Code: en\n" Zope chooses language based on web browser 
> settings :(. When I'm setting  "xml:lang" and "lang" attributtes it 
> doesen't make effect.
i suppose you need a manual lang switch on your site ...

take a look at PlacelessTranslationService/Negotiator.py
you can set a cookie called 'pts_language'


>  
> There is second way. I can do 2 .po files with different "Domain" and 
> choose the one depends on variable but I cant dynamicialy set  
> "i18n:domain" attribute.
>  
>  
> How to manage that?
>  
> Thanks in advance
> Krzysztof Kubacki
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope )



More information about the Zope-Dev mailing list