[Zope-dev] i18n:translate - problem

2004-12-21 Thread Krzysztof Kubacki
ï


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.
 
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  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] i18n:translate - problem

2004-12-21 Thread Bernd Dorn
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  -  [EMAIL PROTECTED]
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 )
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )


Re: [Zope-dev] i18n:translate - problem

2004-12-22 Thread Chris Withers
Bernd Dorn wrote:
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'
...or you can just write a negotiator that behaves the way you want.
Chris
--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk
___
Zope-Dev maillist  -  [EMAIL PROTECTED]
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 )