Magento – Translation Only Works in US Locale, Not Others

adminlocalisationmagento-1.9

admin panel always do translation from en_US. where did i do wrong?

helper

$helper=Mage::helper('test');
$helper->__('Shipping Method');

config.xml

<frontend>
    <translate>
        <modules>
            <test>
                <files>
                    <default>test_test.csv</default>
                </files>
            </test>
        </modules>
    </translate>
</frontend>
<adminhtml>
    <translate>
        <modules>
            <test>
                <files>
                    <default>test_test.csv</default>
                </files>
            </test>
        </modules>
    </translate>
</adminhtml>

app/locale/en_US/test_test.csv

"Shipping address","Shipping Address"
"Billing address","Billing Address"
"Shipping Method","Shipping Method"

app/locale/ar_SA/test_test.csv

"Shipping address","test"
"Billing address","test1"
"Shipping Method","test2"

Best Answer

Well, I reckon the tag between <modules> and <files> should be the entire module name with the vendor name, in your case it seems to only be the module name.

So if your module is Test_Test I reckon your config.xml code should be:

<frontend>
    <translate>
        <modules>
            <Test_Test>
                <files>
                    <default>test_test.csv</default>
                </files>
            </Test_Test>
        </modules>
    </translate>
</frontend>
<adminhtml>
    <translate>
        <modules>
            <Test_Test>
                <files>
                    <default>test_test.csv</default>
                </files>
            </Test_Test>
        </modules>
    </translate>
</adminhtml>
Related Topic