I have installed a new theme, I created the i18n directory with the csv file. I entered this command to create the dictionary:

 php magento2/bin/magento i18n:collect-phrases --output="magento2/app/design/frontend/OrangeCo/orange/i18n/en_US.csv" magento2/app/design/frontend/OrangeCo/orange

To take effect I entered:

 bin/magento setup:static-content:deploy

The problem is that some link or button name are not translated.

  • did you run php bin/magento i18n:pack magento2/app/design/frontend/OrangeCo/orange/i18n/en_US.csv -d en_US ?
    – fmsthird
    Jun 10 '19 at 7:17
  • No,I don't need a language pack.
    – blob
    Jun 10 '19 at 7:59

Please your link and button name write in this way

<?php echo __('your link and button name'); ?>

You can try this code

<?php / @escapeNotVerified / echo __('your link and button name') ?>

If you adding those button and link in phtml file then you can use it as

<?= __("Your desired text"); ?>

If you are adding this text from js file then use mage/translate.js for translation.

], function($){ 
 $(window).load(function() {
    alert($.mage.__('Your desired text'));

As in above example it is using $.mage.__("Your desired text"), you can also pass your text in the same way.

Hope this will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.