25 votes
Accepted

Magento 2 Translations not working

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 ...
Devtype's user avatar
  • 3,008
25 votes
Accepted

Magento 2: what does i18n mean?

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 ...
Raphael at Digital Pianism's user avatar
19 votes
Accepted

Magento2: List translation strings from a module

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 ...
Marius's user avatar
  • 198k
17 votes
Accepted

How to override translate csv files in magento2

You have to just override the en_US.csv file into your theme i18n folder. app/design/frontend/{Vendorname}/{themename}/i18n/en_US.csv
Rakesh Jesadiya's user avatar
14 votes

How do you add translation for extensions in Magento2?

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 ...
Langley's user avatar
  • 940
12 votes

How to override translate csv files in magento2

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.
Suresh Chikani's user avatar
10 votes
Accepted

Magento2 localisation Javascript

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 ...
Timon de Groot's user avatar
9 votes
Accepted

Magento 2 : How to install new language pack

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 ...
Suresh Chikani's user avatar
8 votes
Accepted

Magento 1: Use of <![CDATA in the system configuration XML

You should use CDATA to ensure the text inside it is not interpreted as XML/HTML. But nobody restricts you to use it for every text tag. The fact there is one or more uses of CDATA without having ...
Marius's user avatar
  • 198k
8 votes

How to translate module with i18n

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/...
Suresh Chikani's user avatar
7 votes
Accepted

How to translate within observer

Instead of using $this->__('something to translate'), use Mage::helper('modulename')->__('something to translate') I searched the Magento codebase further and there are examples of this being ...
Dom's user avatar
  • 468
7 votes
Accepted

How does translation scope work in Magento 2?

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 ...
KAndy's user avatar
  • 20.8k
7 votes

Magento 2: Change Text On Checkout Page

To Change label, You need to copy following file to your theme folder. <magento root>/vendor/magento/module-checkout/view/frontend/web/js/view/shipping.js Now copy this file to following. &...
Salma Saiyad's user avatar
  • 1,214
7 votes
Accepted

Magento 2: Translate input placeholder attribute string in Knockout html template

You can write like this <input type="text" data-bind="attr:{placeholder: $t('Email')} " /> Run below commands php bin/magento setup:upgrade php bin/magento setup:static-content:deploy php ...
Suresh Chikani's user avatar
6 votes
Accepted

magento 2: 'i18n:collect-phrases' command creates different csv files

The CSV with 4 columns is the global CSV for all modules. That's why it contains 3rd column as module and 4th column as Module_Name.This file should be placed in i18n folder parallel to app. The CSV ...
Gulshan's user avatar
  • 569
6 votes
Accepted

Magento 2 : Priority of translation, proper way

Currently, language pack translations have priority over theme translations. This is going to be fixed in Magento 2.2, see https://github.com/magento/magento2/pull/7142
Fabian Schmengler's user avatar
6 votes
Accepted

Magento 2:i18n folder to custom theme

When you have to override transalation file from core module into your theme, You have to keep its inside theme i18n Folder, app/design/frontend/vendor/theme/i18n/en_US.csv Just run command php bin/...
Rakesh Jesadiya's user avatar
5 votes

Title tag in layout is not translated

It still does not seem possible to set a title in the head section and translate it, but you could create a custom customer_account_forgotpassword.xml to fix the issue with this code <...
LucScu's user avatar
  • 2,322
5 votes

Remove var Translator = new Translate from <head> section

I have to agree with you that this is minimally not 'good' for SEO. Magento has to make sure that inline JS is made to a bare minimun. That this is inline JS is just lazy programming. We put this JS ...
Wouter Steenmeijer's user avatar
5 votes
Accepted

Magento 2 - translating problem in JS templates

Ok, so finally got this resolved by creating a new language pack, modified certain template files and cleared all caches: Created a new language pack: created new folder inside app/i18n/< vendor >...
g5wx's user avatar
  • 681
5 votes
Accepted

Translating the custom text in form.phtml file

You did not show, how you added the paragraph, but this is what it should look like so that it gets translated by Mage_Contacts.csv: Mage::helper('contacts')->__('here is your paragraph');
Fabian Schmengler's user avatar
5 votes

How to add a new language - Magento 2.0.1

Step 1: collect the phrases First, you need to find out the phrases that you need to translate. You can do so by running: php bin/magento i18n:collect-phrases -o "/path/to/magento2/app/i18n/vendor/...
Raphael at Digital Pianism's user avatar
5 votes

Magento2 change Tax to VAT

Magento ver. 2.1.9 go to here: / vendor / magento / module-tax / view / frontend / layout / checkout_cart_index.xml find and replace Tax to VAT and / vendor / magento / module-tax / view / ...
Atish Dipankar Baidya's user avatar
5 votes

Magento 2 Translations not working

Had the same problem on my Magento 2 website, tried all sorts of suggestions how to fix it but the only thing that worked for me was - go to /pub/static/frontend/<theme>/<theme>/<...
Pinky_P's user avatar
  • 85
5 votes
Accepted

How to properly translate strings in JavaScript

Write your strings to be translated like so: $.mage.__('Foobar') $('.readmorebutton').click(function() { if (! $('.readmore').hasClass('open') ) { $('.readmorebutton').text($.mage.__('...
Eamonn's user avatar
  • 508
5 votes
Accepted

How to translate module with i18n

2 points: You placed translate file into wrong place. The correct path should be app/code/<My_vendor>/<My_module>/i18n/jp_JP.csv. And you didn't use __('text to translate') to parse the ...
PY Yick's user avatar
  • 2,705
5 votes

Magento 2 translate the "You added ... to your shopping cart." line

if you are using following line in i18n on theme as translation source "You added %1 to your shopping cart." then change it to "You added %1 to your <a href=""%2"&...
Shuvankar Paul's user avatar
5 votes
Accepted

Problem Translation word "Checkout"

Try to search in all it_IT.csv on your site where the string Checkout were. Probably in it_IT language it was display as blank character. Moreover take a look on translate inline table from database. ...
Tuyen Nguyen's user avatar
  • 1,312
4 votes

Changing text of customer "edit address" field

Never edit core files in Magento! Solution without changing core files You can define custom translations in your theme, create the following file if it does not exist yet: app/design/frontend/[...
Fabian Schmengler's user avatar
4 votes

How does translation scope work in Magento 2?

Here's what I've found, not sure if it will answer all of your questions though. So the translation is something that's happening in the \Magento\Framework\Phrase class (an object of this class is ...
Raphael at Digital Pianism's user avatar

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