84

TL;DR If you are not interested in the details how the translation works, skip the content up to the What to check if your translation isn't working section below, especially the subsection Solution for Module Scope Translation conflicts. Magento Translation Overview Magento prioritizes translations sources (from highest to lowest): DB (the ...


39

For this: <?php echo Mage::helper('catalog')->__('Text here');?> Add like: app/locale/{lang_ISO}/Mage_Catalog.csv "Text here","Translation here" For this: <?php echo $this->__('Text here'); ?> Or this (in theme local.xml, note the translate attribute; also see https://stackoverflow.com/a/8408058/794071): <reference name="top....


29

In some instances, Magento has multiple modules trying to translate the same item. Take Add to Cart for example. In Magento the modules Mage_Catalog, Mage_Checkout, Mage_Reports, Mage_Sales, Mage_Tag, Mage_Wishlist and Mage_XmlConnect all try to translate this string. What helps in those cases is to specify which translation of which module you are trying ...


25

Just theorizing, but when you call $this->__('Foo') in a template, which module's CSV translation file will Magento use to translate Foo? It's not always clear which module's translation helper Magento will ultimately call to translate the string/key. Since Magento allows you to use the same key in different modules for different strings, it's often ...


24

Wikipedia answered my question: Internationalization and localization The terms are frequently abbreviated to the numeronyms i18n (where 18 stands for the number of letters between the first i and the last n in the word internationalization, a usage coined at DEC in the 1970s or 80s)[3][4] and L10n for localization, due to the length of the ...


21

Create a directory app/i18n/Vendorname/en_US Issue command: bin/magento i18n:collect-phrases --output "app/i18n/Vendorname/en_US/en_US.csv" --magento This will collect all the translatable phrases in csv file and place it in the specified path. Make changes to the csv file as per your requirement and when ready issue command: bin/magento i18n:pack app/...


20

Because you want to use an explicit module. If you use $this->__() in a block context, the module of the block is used for translation. So if you want to use a special module, then you have to use Mage::helper('mymodule')->__()


19

Create an upgrade script with this code: $setup->updateAttribute('catalog_category', 'menutopdescription1', 'is_global', Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE); $setup is an instance of Mage_Catalog_Model_Resource_Setup or Mage_Eav_Model_Entity_Setup. If you want to change the db directly (I don't recommend it) you need to change the ...


19

The definitive answer to this question is that Special Price is an attribute. You can simply translate the Special Price price-label from your Magento Admin Panel, just go to Catalog > Attributes > Manage Attributes and open the Special Price attribute (attribute code special_price). From there select the tab Manage Label / Options. Here you can ...


17

Try this. To sum, specify an additional translation file under the core module's translation XPath and place your overriding CSV pairs in there. <frontend> <translate> <modules> <Mage_Sales> <files> <mr_storms_wicked_translations>Mage_Sales_Custom.csv</...


17

Magento 2 already has a command that can collect all the texts from a certain folder that are translatable. Since one module can mean 1 folder, let's say your module name is app/code/Vendor/Module you can collect all translatable texts like this: bin/magento i18n:collect-phrases app/code/Vendor/Module/ -o app/code/Vendor/Module/i18n/en_US_raw.csv Just make ...


16

Beside the translate.csv and the non-portable inline translate there is an other way. I do it like this. Each module supports more than one translation file. If you add this in config.xml: <translate> <modules> <[Namespace]_[Module]> <files> <default>[Namespace]...


16

You have to just override the en_US.csv file into your theme i18n folder. app/design/frontend/{Vendorname}/{themename}/i18n/en_US.csv


14

Translation Sources Translations are merged from different sources: Module translations from the respective XML files, theme translations from the translate.csv of the current theme, and inline translations from the database. Translations can be strictly module specific (only valid within a module), that’s always the case for inline translations and ...


14

To translate a crumb without using a helper, you can use the translate attribute for your action node by using crumbInfo.label and crumbInfo.title. Exemple: <reference name="breadcrumbs"> <action method="addCrumb" translate="crumbInfo.label crumbInfo.title"> <crumbName>home</crumbName> <crumbInfo> ...


13

I assume you mean IWD OPC? If not you can ignore this answer. The checkout extension ships without translations. It should be fairly easy to generate those. First, you need to create i18n directory inside the module so the structure is <mage_dir>/app/code/Vendor/Opc/i18n Then generate the dictionary with magento shell tool; from : php bin/magento ...


11

I found this old topic, and later found a solution: when the same string exists in multiple module translation files, then Magento will scope it, by default with '::'. So you also have to create separate translation strings for all those scopes in your translation.csv "Mage_Customer::Fax","Fax" "Mage_Checkout::Fax","Fax" And for all the other modules in ...


11

Create a en_US.csv file in this path. app/design/frontend/Vendor/Theme/i18n/en_US.csv Put your changes in this file. Clear cache (bin/magento cache:clean) and check your changes.


10

By default Magento doesn't support translation out-of-box for error pages, and requires some customizations to allow for such features. So technically there is no proper way to do such. Since the full stack is NOT initialized during error generation, normal translation functionality $this->__('foobar'); won't work in the templates. Some details on how ...


10

Not sure if you figured it out already, but I thought I'd answer anyway.. I guess the other answers are heading in the right direction. Assuming you already have the translations installed, if not please: bin/magento i18n:pack -m replace -d source_nl_NL.csv . nl_NL So, first of all, please clear the cache(as others suggested as well): rm -rf var/cache ...


9

CSV files located in app/locale should be regarded as core files and not modified. I find that the best way to add custom translation is to put them into app/design/frontend/{package}/{theme}/locale/{locale}/translate.csv Please note that you can use module names in translate.csv files as well using "Mage_Adminhtml::Sales","Sales" instead of "Sales","Sales"....


9

Basically I'm going to say the same thing as the other guys said. If you use Mage::helper(...) you make sure that a specific helper is used for translation. For example let's take the Mage_Adminhtml_Block_Catalog_Product_Grid block. For the column headers there is this: 'header'=> Mage::helper('catalog')->__('Name'),. if instead of the catalog ...


9

The gender attribute is a dropdown attribute like any other one. Its labels are stored in the table eav_attribute_option_value. But since there is no (out of the box) way to manage from the backend the customer attributes I see 2 options here. Option 1. Quick and dirty: Change the options in the template. Copy app/design/frontend/base/default/template/...


9

Make sure, that you have nothing entered in System > Configuration > developer > Developer Restriction > Allowed IPs or if you have, that your ip is part of it.


9

I have done by just using below command for it composer require splendidinternet/mage2-locale-de-de php bin/magento setup:upgrade php bin/magento setup:static-content:deploy de_DE Note : commands need to be run from your magento root. More info : Magento 2 German LocalePack de_DE It's works for me.


8

There could be any reason below, or a combination of many. So I write down all of them: There must be a store view for German language (System > Manage Stores); Go to System > Configuration > General / General > Locale Options. Choose German language view from Current Configuration Scope (upper left corner). Make sure that German locale is chose; Make sure ...


8

Magento uses PHPs vsprintf method. So instead of %1$s you'll have to use %1\$s


8

Question is a little bit older, but i had the same problem! And maybe there are some others :-) So, my solution: Go to Catalog -> Manage Products and edit your super product. Goto Tab Associated products. In Super product attributes configuration check for each configurable attribute the Use default. Then, Magento will use the default translation like ...


8

Does this mean there is no such thing as a module scope anymore? Yes If so, what happens if two different modules define different translations for one string? Magento 2 load translation from all modules and then load from current (based on current controller). In most cases this resolve problem. I'm thinking of ambiguous words like "state" that ...


8

Translation file path should be app/code/My_vendor/My_module/i18n/jp_JP.csv You should write a translate text code in your controller app/code/<My_vendor>/<My_module>/Controller/index.php like below $form = '<h3>' . __('test') . '</h3>';


Only top voted, non community-wiki answers of a minimum length are eligible