Specifying the target language with i18n
Hello, I am trying to set the target language using "i18n:target" label Example: <p i18n:translate="" i18n:target="string:en"> label_search </p> It doesn't work. I cannot specify the target language. I am in Zope 2.9.4. Thank you. ______________________________________________ LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://es.voice.yahoo.com
Hi Daniel,
Hello,
I am trying to set the target language using "i18n:target" label
Example:
<p i18n:translate="" i18n:target="string:en"> label_search </p>
It doesn't work. I cannot specify the target language.
I am in Zope 2.9.4. Just a guess: Don't you need to specify a domain as well?
Regards Josef
Example:
<p i18n:translate="" i18n:target="string:en"> label_search </p>
It doesn't work. I cannot specify the target language.
I am in Zope 2.9.4. Just a guess: Don't you need to specify a domain as well? Ok, I tested it as well and it didn't work either. I just found it is a bug and here is a patch: http://www.zope.org/Collectors/Zope/1114
However be careful when using patches, specially when working with unicode data. You have to make sure they don't concatenate normal strings and unicode: This is really difficult to debug. I think that the "i18n:target" directive is only useful you want to show a text in a zpt which must be always rendered in the same language (ie: some governmental entities shows first an English version of a official document, then immediately above there is a version let's say in spanish). But if what you want is to change the language in the whole zpt, then implementing your IUserPreferredLanguages would do the trick. Regards Josef
participants (2)
-
Daniel de la Cuesta -
Josef Meile