| From | Sent On | Attachments |
|---|---|---|
| Reynier Perez Mira | May 15, 2008 8:13 pm | |
| Reynier Perez Mira | May 16, 2008 4:48 am | |
| Bernhard Schussek | May 16, 2008 11:56 pm | |
| Reynier Perez Mira | May 17, 2008 7:44 am |
| Subject: | RE: [symfony-users] Re: Problems with translation and I18N | |
|---|---|---|
| From: | Reynier Perez Mira (rper...@uci.cu) | |
| Date: | May 17, 2008 7:44:08 am | |
| List: | com.googlegroups.symfony-users | |
Hi,
After several days giving head butt with the problem I have found a solution. I
left here because maybe in the future somebody could have the same problem:
1. Set default cultura to es_ES #apps/backend/config/i18n.yml all: default_culture: es_ES debug: off
2. Activate the i18n use in every enviroment and put UTF-8 as default charset: #apps/backend/config/settings.yml prod: .settings: i18n:on
dev: .settings: i18n:on
all: .settings: i18n:on charset: utf-8
3. Activate the I18N helper in every, absolutely every, template in wich I use
translation
<?php use_helper('I18N') ?>
4. And not for be the last less important, delete every cookie that application
or symphony has created. If you don't do this then you couldn't see the correct
translation and this is what happen to me.
Hope this help to others in case they have the same problem Cheers and thanks for every Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP
-----Original Message----- From: symf...@googlegroups.com [mailto:symfony- use...@googlegroups.com] On Behalf Of Bernhard Schussek Sent: Saturday, May 17, 2008 02:57 AM To: symf...@googlegroups.com Subject: [symfony-users] Re: Problems with translation and I18N
Hello!
Are you sure you are calling your site with user culture "es"? You set your default culture to "en", and your translation file only translates "en"->"es" if the active culture is "es". Could that be the problem?
Regards and good luck, Bernhard
2008/5/16 Reynier Perez Mira <rper...@uci.cu>:
Thanks Nicholas but nothing, I still getting the same behavior. I made the
changes in both files: messages.es.xml and messages.es_ES.xml and nothing. Both file have this same code:
<?xml version="1.0" ?> <xliff version="1.0"> <file orginal="global" source-language="en_US" datatype="plaintext"> <body> <trans-unit id="1"> <source>nombre_licencia</source> <target>Licencia:</target> </trans> <trans-unit id="2"> <source>nombre_categoria</source> <target>Nombre Categoría</target> </trans> </body> </file> </xliff>
So .... I really don't know what's wrong Cheers and waiting for some solution Ing. Reynier Pérez Mira Grupo Soporte al Desarrollo - Dirección Técnica IP
-----Original Message----- From: symf...@googlegroups.com [mailto:symfony- use...@googlegroups.com] On Behalf Of Nicolas Perriault Sent: Friday, May 16, 2008 04:23 AM To: symf...@googlegroups.com Subject: [symfony-users] Re: Problems with translation and I18N
2008/5/16 Reynier Perez Mira <rper...@uci.cu>:
<trans-unit id="1"> <source> nombre_licencia </source> <target> Listar </target> </trans-unit>
You must use this format:
<trans-unit id="1"> <source>nombre_licencia</source> <traget>Listar</target> </trans>
The text in the tag must exactly fit the string you pass to the __() function.
HTH
++
-- Nicola





