Questions tagged [i18n]

Denotes questions regarding i18n directory of a Magento module or theme

Filter by
Sorted by
Tagged with
0 votes
1 answer
30 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 ...
user avatar
0 votes
1 answer
101 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....
user avatar
  • 1,083
0 votes
1 answer
133 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 ...
user avatar
  • 2,625
0 votes
0 answers
36 views

Magento pwa studio

how can localization be added to the application? like in: node_modules/@magento/venia-ui/i18n/en_US.json if I copy the file to this path it works, is there another way to do this?
user avatar
0 votes
1 answer
117 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" ...
user avatar
  • 1,123
0 votes
1 answer
166 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 ...
user avatar
1 vote
1 answer
50 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'...
user avatar
  • 195
0 votes
1 answer
67 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 joe@mail.com, 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 ...
user avatar
  • 167
0 votes
0 answers
47 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/...
user avatar
  • 129
1 vote
0 answers
11 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: ...
user avatar
2 votes
1 answer
113 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') --> ...
user avatar
  • 1,107
2 votes
1 answer
519 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 ...
user avatar
  • 2,402
1 vote
2 answers
452 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 ...
user avatar
2 votes
0 answers
175 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, ...
user avatar
  • 21
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 ...
user avatar
2 votes
1 answer
540 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/...
user avatar
2 votes
1 answer
492 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 ...
user avatar
  • 123
0 votes
0 answers
348 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 ...
user avatar
  • 600
1 vote
3 answers
1k 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
user avatar
  • 1,389
0 votes
1 answer
36 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 ...
user avatar
1 vote
1 answer
382 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. ...
user avatar
  • 527
4 votes
0 answers
73 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 ...
user avatar
2 votes
2 answers
2k 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/...
user avatar
  • 139
1 vote
1 answer
195 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 ...
user avatar
  • 139
5 votes
1 answer
2k 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. <...
user avatar
  • 2,048
5 votes
5 answers
5k 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 ...
user avatar
  • 83
1 vote
1 answer
62 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?
user avatar
1 vote
0 answers
151 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 ...
user avatar
  • 173
2 votes
3 answers
1k 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 ...
user avatar
0 votes
1 answer
447 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 ...
user avatar
1 vote
1 answer
402 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 ...
user avatar
0 votes
1 answer
34 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 ...
user avatar
  • 101
2 votes
1 answer
3k 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, ...
user avatar
  • 1,951
1 vote
2 answers
801 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/...
user avatar
  • 770
2 votes
2 answers
76 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 ...
user avatar
1 vote
1 answer
169 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/...
user avatar
2 votes
3 answers
2k 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 ...
user avatar
0 votes
2 answers
8k 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","...
user avatar
3 votes
1 answer
7k 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 &...
user avatar
  • 2,757
1 vote
1 answer
419 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/...
user avatar
1 vote
1 answer
661 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/...
user avatar
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 ...
user avatar