One of best things in magento is you can easily add new language versions to the site. It's all done using CSV files - 1 file for 1 module per language. For most popular languages translations are available as free Magento modules on magento connect.
What if we want to change the translations and don't lose changes after updating magento and translations? Or if we want to have translation common independently of module? Or just list all the texts that were added by us and are not original magento texts? We can create our own very simple translations module.
You need to edit only 2 files:
- etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Baobaz_Translations>
<version>0.1.0</version>
</Baobaz_Translations>
</modules>
<global>
<helpers>
<translations>
<class>Baobaz_Translations_Helper</class>
</translations>
</helpers>
</global>
<frontend>
<translate>
<modules>
<Baobaz_Translations>
<files>
<default>Baobaz_Translations.csv</default>
</files>
</Baobaz_Translations>
</modules>
</translate>
</frontend>
</config> - and helper/data.php:
class Baobaz_Translations_Helper_Data extends Mage_Core_Helper_Abstract
{
}
and that's it... Module must be turned on (in etc/modules) and it will work fine.
in app/locale/fr_fr/ we create file Baobaz_Translations.csv and in it we put all the new translations we need.
Then, anywhere in magento - doesn't matter if it's template, block or controller - we can use:
Yes. It is that simple.





