In Magento, you can run a store in multiple languages so that your module is translatable to the configured languages. In this recipe, we will add a custom translate CSV file to our module where we can place the custom strings if needed.
For this recipe, we have to add some configuration in the config.xml
file of our module. Also, we have to create a translate CSV file in the locale
folder.
In the following steps, we will add configuration to the module so that we can translate the interface to multiple languages:
Add the following configuration as a child of the
<frontend>
tag in theconfig.xml
file of thehelloworld
module. This will initialize an extratranslate
file to the installation:<translate> <modules> <Packt_Helloworld> <files> <default>Packt_Helloworld.csv</default> </files> </Packt_Helloworld> </modules> </translate>
We just configured...