Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module translation is not translating

I got a little problem with Magento translation in my module, because it does not work. It should be easy as all tutorials saying. There is a .csv-file in every app/locale/[xx_XX]/ - folder and also an entry in config.xml. I have a helper in my module, which is also registered in config.xml and I can use it. After all, I cleared all cachefiles and tried again.

What did I wrong or what I forgot?

The call in code:

$str = Mage::helper('mymodule')->__('mystring');

And in config.xml (tried this block in frontend, adminhtml and global namespaces):

<translate>
    <modules>
        <Namespace_Module>
            <files>
                <default>Namespace_Module.csv</default>
            </files>
        </Namespace_Module>
    </modules>
</translate>
like image 240
Daniel Avatar asked Aug 03 '11 13:08

Daniel


People also ask

What are the three 3 main types of translators?

Generally, there are three types of translator: compilers. interpreters. assemblers.

What is a translation module?

The Content Translation module allows you to translate content, comments, custom blocks, taxonomy terms, users and other content entities. Together with the modules Language, Configuration Translation, and Interface Translation, it allows you to build multilingual websites.

How do you add translation to Weglot?

If you wish to translate a particular media file from within the Weglot dashboard, go to the “Translations' tab and click on the language pairing you wish to edit. Scroll to the bottom of the page and you'll see 'Add a media translation'. Click on this button.


1 Answers

I remember having translation problems when my shop ran in development mode. There was a rationale behind it, allowing you to better debug translations or something.

I believe the specific case was that in development mode, the first translation encountered was picked. In non-development, only the specific module is searched.

So say, you have module A and B, and they both have term "Translate this", in my development environment, I got the translation from module A, while in production, i got it from module B.

Not sure what kind of terms you have, but it could relate to your problem.

like image 50
Grimace of Despair Avatar answered Oct 18 '22 07:10

Grimace of Despair