Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use localization while developing magento extension?

Currently i am developing a magento extension. I want to use the localization option which will translate data which is related to extension to other languages. But i dont know how to use it.

I have tried the following.

config.xml

<config>
  <adminhtml>
     <translate>
         <modules>
             <abcdef>
                 <files>
                    <default>name.csv</default>
                  </files>
             </abcdef>
          </modules>
       </translate>
  </adminhtml>
</config>

Then i have placed the name.csv file in the locale folder. But still this doesn't work for me.. Hope somebody will help me.

like image 802
vinothavn Avatar asked Feb 24 '26 05:02

vinothavn


1 Answers

you have to configure like below

<config>
    <frontend>
        <translate>
            <modules>
                <IWD_OnepageCheckout>
                    <files>
                        <default>IWD_OnepageCheckout.csv</default>
                    </files>
                </IWD_OnepageCheckout>
            </modules>
        </translate>
    </frontend>
</config>

And for admin

<config>
    <adminhtml>
        <translate>
            <modules>
                <IWD_OnepageCheckout>
                    <files>
                        <default>IWD_OnepageCheckout.csv</default>
                    </files>
                </IWD_OnepageCheckout>
            </modules>
        </translate>
    </adminhtml>
</config>

pls clear browser and magento cache to test it.

hope this will sure work for you,

like image 136
liyakat Avatar answered Feb 27 '26 01:02

liyakat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!