EasyAdminBundle entities labels translations

2.1k views Asked by At

I'm unable to configure translations. My config.yml has (among others) this entry:

easy_admin:
entities:
    Blog:
        label: app.blog
        class: AppBundle\Entity\Blog

I've also created a translation resorce: messages.es.xliff with this entry:

<?xml version="1.0" encoding="utf-8"?>
 <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
    <file source-language="es" target-language="es" datatype="plaintext" original="file.ext">
        <body>
            <trans-unit id="app.blog">
                <source>app.blog</source>
                <target>Blog</target>
            </trans-unit>
        </body>
    </file>
</xliff>

but the translated literal doesn't appear in the left menu.

Thank you very much for your help.

2

There are 2 answers

0
Alex On BEST ANSWER

At last I've changed the name of translation ressource to EasyAdminBundle.es.yml and now everything works fine.

0
Marcos Labad On

Ensure you have the translator service enabled. In app/config/config.yml:

 framework:
        translator:      { fallbacks: ["en"] }