Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [i18n]

Denotes questions regarding i18n directory of a Magento module or theme

Filter by
Sorted by
Tagged with
6 votes
4 answers
8k views

Magento 2.3 translations (translate label) in the admin panel (backend)

In Magento 1 I just added a translate.csv for my admin area. How can I achieve this in Magento 2? I just want to change the translations of a few things and add some missing translations. Can't I put ...
Scotti's user avatar
  • 93
5 votes
1 answer
3k views

Magento 2 : How to concat a string variable to option value in knockout template which already bind to i18n string?

I've knockout template which contains the following line: <option value='industrial' data-bind="i18n: 'Industrial'"></option> anyone knows how to add variable to 'Industrial' eg. <...
hkguile's user avatar
  • 2,221
5 votes
0 answers
157 views

Magento2 : Get translation for multiple languages

I have a Magento 2 with a multiple website/store/storeview setup. Now I want to create a list of links with the text "Continue on [store_name] store". The problem is that I want to translate it in the ...
Arno Vande Cappelle's user avatar
4 votes
1 answer
8k views

Magento2: List translation strings from a module

In order to build this CSV app/code/Vendor/Module/i18n/en_US.csv, I want to get an array from my module with all the translation-ready strings from all files types (.php, .phtml, .js, .xml). .php &...
St3phan's user avatar
  • 2,907
4 votes
2 answers
3k views

Magento 2 - extend core module translation i18n for a very specific area [duplicate]

Magento 2 translation problem (my locale is set to en_US): I want to change the "Email" label on the Contact Us page to "Email Address:". However, I DO NOT WANT the "Email" label changed anywhere ...
TigerCotty's user avatar
3 votes
1 answer
5k views

Magento 2: get current store view in JS

I need to get current store view code in JS component to compose i18n-compatible route to the REST API operation: define( ["jquery", "ko", "uiComponent", "mage/translate"], function ($, ko, ...
Alex Gusev's user avatar
  • 2,039
3 votes
1 answer
132 views

Magento2 : How to translate input value in html template

I try to translate the value attribute of an input <input type="checkbox" id="html" name="fav_language" data-bind="i18n: {value:'Check here'}"> I tried ...
Kevin ami's user avatar
  • 123
2 votes
2 answers
4k views

Translation file magento 2 i18n

I'm trying to change "Excl. Tax:" to "Excl. Vat:" and have created a CSV file called en_GB.csv which contains the line - "Tax:", "Vat:". I've saved and uploaded this to app/design/frontend/Magento/...
Eddie's user avatar
  • 139
2 votes
4 answers
2k views

Change 'Sort by Position' text to 'Sort by New' Magento 2.2.6

This must/should be easily achieved...I am simply hoping to change the 'Sort By Position' text to 'Sort by New' in the Magento category list toolbar. I have attempted to do this by creating the ...
YorkieMagento's user avatar
2 votes
3 answers
3k views

Add Language translation text in magento2

I have added the new field in Customer navigation section near the Sign In, For that new field I need to fr_FR translation where I need to add the translation text? Those translation files are working ...
Jeeva Chezhiyan's user avatar
2 votes
1 answer
982 views

The "i18n:collect-phrases" command does not collect all translatable strings from JS

During module development I trying to collect all translations to the i18n/en_US.csv file using regular command: sudo -u www-data php bin/magento i18n:collect-phrases -o /var/www/html/app/code/Vendor/...
Siarhey Uchukhlebau's user avatar
2 votes
1 answer
950 views

How can I automatically collect new translations without overriding already translated strings?

As far as I understand, there are three steps to adding translations: collect phrases (bin/magento i18n:collect-phrases ...) to a CSV file that has two columns, e.g., "order","order" replace the ...
Daniel's user avatar
  • 123
2 votes
1 answer
716 views

How to translate text in shipping-estimation.html

I need to translate the text Enter your billing address to get a tax estimate. in vendor\magento\module-checkout\view\frontend\web\template\cart\shipping-estimation.html It is a text showing in the ...
Black's user avatar
  • 3,390
2 votes
2 answers
102 views

Page home magento 2

I installed a template and put all the necessary translations in the i18n file but still can't see the translation. My question is: Do I have to create 3 home pages and then choose the store-view for ...
Developper Magento 's user avatar
2 votes
2 answers
354 views

Magento2 i18n not working Magento_Ui custom theme

I tried to add a translation on : app/design/frontend/Theme/theme/Magento_Ui/web/templates/form/field.html I added a translation like this : <div class="gotcompany" data-bind="i18n: ...
Kevin ami's user avatar
  • 123
2 votes
1 answer
643 views

Translating in html templates using i18n

I'm using i18n to translate some values in html static templates (default.html): So this does not work: <!-- ko if: (!Array.isArray(option.value) && option.option_type != 'file') --> ...
Joao71's user avatar
  • 1,195
2 votes
0 answers
591 views

Magento 2 - translations on checkout

I've got a big issue with Magento 2.3.1, and translations on checkout, for store made in two langs - EN and PL. (PL set as default store) I've got a custom template, with elements that override Luma, ...
gachowy's user avatar
  • 21
1 vote
1 answer
125 views

Add translation for a plugin

The site that I am working on is using he_IL as primary language of the theme (I think). I installed a plugin which only has en_US.csv its i18 folder I added an he_IL.csv in the i18l folder, but I don'...
justadev's user avatar
  • 245
1 vote
2 answers
969 views

How to translate i18n value from tag in html?

I want to Translate a custom button name using i18n. I tried like this app/code/My_vendor/My_module/i18n/ar_SA.csv "I am the gift Receiver","أنا المتلقي هدية" The affect should take place in ...
Siranjeevi K S's user avatar
1 vote
3 answers
2k views

How to change text "You have no items in your shopping cart." in minicart in magento 2

How to change the text "You have no items in your shopping cart." in mini cart in Magento 2
Divya Sekar's user avatar
  • 1,495
1 vote
1 answer
455 views

Translation csv file in magento theme directory

-v 2.3 theme - luma locale - UK I need to change 'excl tax' to 'excl vat' on my catalog/cart pages and believe I need to create a CSV file with the translation contained this file. My question is ...
Eddie's user avatar
  • 139
1 vote
2 answers
931 views

Magento 2 - Error in line 196 Dictionary.php - Undefined offset

Sometimes after creating a dictionary, I get this error: Undefined offset: 1 in /vendor/magento/framework/App/Language/Dictionary.php a:4:{i:0;s:104:"Notice: Undefined offset: 1 in /srv/www/...
Raül's user avatar
  • 790
1 vote
1 answer
553 views

Translate Knockout Variables

I've been trying to get the shipping titles to translate with no success so far. It seems most questions deal with knockout text but I'm trying to do it on a variable that doesn't seem to be working. ...
Jim's user avatar
  • 537
1 vote
1 answer
70 views

Translation of a module

How can I translate an extension (module) ? I tried to create the i18n folder and create the it_IT.csv file. But it does not work, how can I do translation?
KernelPaniC's user avatar
1 vote
1 answer
485 views

Magento 2 - How to Overwrite Default Translation Core en_US Dictionary Package

I want to change the word "Magento" to "Magento 2 CE" for the Default Translation Core en_US Dictionary Package. How to achieve this without overwrite Magento's core functionality directly at vendor/...
rubenromao's user avatar
1 vote
1 answer
744 views

Magento2 phrases in some specific modules are not translated

I have installed arabic lang pack. But phrases from Magento_Checkout module are not being translated. these are the i18n files in my installation: ./app/i18n/Burooj/ar_SA/ar_SA.csv ./app/code/Burooj/...
Shanavas M's user avatar
1 vote
0 answers
19 views

Need to translate Tax word in Swedish as Moms

I want to translate the word Tax in order summary I have tried adding translation in i18n But still no result here is the code: <tr class="totals-tax"> <th data-bind="text: ...
Anonymous Record's user avatar
1 vote
0 answers
220 views

English to english translation problem magento2

I am translating the text("You canceled the coupon code.") with "Thank you for canceling the coupon code" (This is just english to english translation) from Magento\Checkout\Controller\Cart\CouponPost ...
Max's user avatar
  • 323
1 vote
1 answer
517 views

Magento2: Translate knockout variable with odd beahaivor

I want to translate a variable in Knockout <span id="sales_unit" data-bind="i18n:sales_unit"></span> sales_unit has the value pair. The value should be translated to a different language ...
Peter Horitzer's user avatar
1 vote
1 answer
285 views

Inconsistent translations populated in the js-translation.json

Can anyone please shed some light on the js-translation.json and where it pulls the phrases in from? We have a Spanish store view and we have 934 phrases translated in our app/i18n/vendor/es_es/...
Toni Procter's user avatar
0 votes
2 answers
9k views

How to translate module with i18n

I met a problem that how to translate the module's phrase into other languages(eg. Japanese). For example, some code may like this: app/code/My_vendor/My_module/Controller/i18n/jp_JP.csv "test","...
toshinou's user avatar
0 votes
1 answer
48 views

Translating Child Product Names in Magento

I would like to discuss a scenario regarding the translation of child product names in Magento according to their respective store languages. Currently, we have a Configurable Product with the name &...
Sheri's user avatar
  • 140
0 votes
2 answers
437 views

Magento 2: How to translate knockout html file for word that contains hyperlink?

I have a text like this: To contact us please email us at [email protected], will be waiting! when the user clicked on the email it will redirect the user to mail link, using phtml i can easily achieve it ...
jojo's user avatar
  • 49
0 votes
0 answers
24 views

How to translate Language switcher?

I can't seem to translate the language switcher component. in my csv it_IT i added this: "Language","Lingua",module,Magento_Store "English","EN",module,...
media.queeries's user avatar
0 votes
1 answer
287 views

How to get the locale of the order's store?

I have an order model. How can I get the locale from the store view where the order was created in? Edit On some tutorials I found something like /** @var \Magento\Sales\Model\Order $order */ $order-&...
stollr's user avatar
  • 127
0 votes
1 answer
74 views

Get order data in different language?

I'm trying to fetch the order and/or the product data, but translated to a specific language/store view from an observer. This will send out an internal email so the order will be handled. Im calling ...
vandijkstef's user avatar
0 votes
1 answer
418 views

Magento 2 : How to add Translate Code in JavaScript code in PHTML file?

I am trying to add translate code <?= __('This field is required') ?> in the Magento file using JavaScript but it is not working plz help me. if(response.length == 0) { document....
User0434's user avatar
  • 1,155
0 votes
1 answer
651 views

How to translate variable string in js file?

Let's say I have the following code: define([ 'jquery', 'mage/translate', ], function ( $, $t ) { 'use strict'; return function (str) { //Rest of codes to determine ...
PY Yick's user avatar
  • 2,705
0 votes
1 answer
260 views

Magento 2 change text from region to county

Magento 2 How to change the text from "region" to the "county" on the checkout Paypal page. Need change text from - Please check the shipping address information "region" ...
sumeet bajaj's user avatar
  • 1,316
0 votes
1 answer
377 views

Magento 2 Translation on Ajax Backend Not Working

I am making ajax request , and I call __('string to translate') function on backend. The problem is that translate is not working at all. My ajax controller is implementing HttpPostActionInterface ...
BlueScrinn's user avatar
0 votes
0 answers
346 views

Translating Magento 2 Extension Using Theme Translation Files

I've installed Magefan Blog using the composer. So I can't add a new translation to the extension itself. I tried to add the translations to the theme i18n files on the path app/design/frontend/Vendor/...
AboElnouR's user avatar
  • 213
0 votes
1 answer
2k views

Magento 2.3.3 - Programmatically shipment email sent in the wrong language

I am trying to programmatically create the shipment and I succeeded in this operation. To do this I create a new CLI Command which I obviously run by command line. I have only 1 storeview and the ...
hippoglollum's user avatar
0 votes
0 answers
489 views

Magento 2: theme translation does not work

Magento 2.2.9 I have a third party module (vendor/mirasvit/module-search-autocomplete). It comes with several translatable strings (i18n/en_US.csv). I want to translate the string Show all %1 ...
omsta's user avatar
  • 698
0 votes
1 answer
42 views

Magento 2.2.8 ignores my theme's dictionary

I'm hitting my head against a wall on this one. I've gone through not only the Magento documentation regarding custom translations in themes, but also many answered questions found via Google, and ...
Crankycyclops's user avatar
0 votes
1 answer
57 views

translation csv not visible

I made a CSV. Name: 'nl_NL.csv' Content: You added %1 to your shopping cart.,U heeft %1 aan uw winkelwagen toegevoegd. That as what I want to Translate in Dutch as it is not in the standard ...
Emile's user avatar
  • 101
0 votes
1 answer
596 views

Magento 2: Some texts are not translated

Magento 2.2.6: Some texts are not translated, like Proceed to checkout, Company, Continue Shopping etc. I am using below string:- "Proceed to Checkout","ادفع الآن",module,Magento_Checkout "Proceed ...
Purushotam Sharma's user avatar