eZ Community » Forums » Developer » i18n messages still in english in...
expandshrink

i18n messages still in english in administration

i18n messages still in english in administration

Monday 07 November 2011 2:50:29 pm - 2 replies

Hi there,

I'm writing a module for administration purpose and it should be displayed in french but developped in english.

So I made a translation/fre-FR/translation.ts like this :

<!DOCTYPE TS>
<TS>
    <context>
        <name>martin/workflow</name>
        <message>Registering a partner</message>
        <translation>Enregistrement d'un partenaire</translation>
    </context>
    <context>
        <name>martin</name>
        <message>
            <source>Offers list</source>
            <translation>Liste des offres</translation>
        </message>
        <message>
            <source>Offers</source>
            <translation>Offres</translation>
        </message>
        <message>
            <source>Partner</source>
            <translation>Partenaire</translation>
        </message>
        <message>
            <source>Add a new offer</source>
            <translation>Ajouter une nouvelle offre</translation>
        </message>
        <message>
            <source>Delete selection</source>
            <translation>Supprimer la selection</translation>
        </message>
    </context>
</TS>

And tryed to use it in a template like this :

<h1 class="context-title">{'Offers list'|i18n('martin')}</h1>

But the text still untranslated (the selected locale for the administration interface is fre-FR).

Any idea ?

Monday 07 November 2011 3:16:49 pm

Hi Damien,

your file has an issue in the first context, it should be:

    <context>
        <name>martin/workflow</name>
        <message>
            <source>Registering a partner</source>
            <translation>Enregistrement d'un partenaire</translation>
        </message>
    </context>

in addition, I suppose this file is in an extension and thus its path should be translations/fre-FR/translation.ts (a s is missing in the path you mentioned)

Cheers

Modified on Monday 07 November 2011 3:17:20 pm by Damien Pobel

Monday 07 November 2011 3:46:10 pm

Thanks Damien, you were right. I missed the "s" at the end of translation and my first message declaration was very ugly blunk.gif Emoticon

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from