1

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. Here's what I want to translate, which is located in app/design/frontend/Me/Mylook/Magento_Checkout/templates/cart/shipping-rates.html:

<!-- ko i18n: $data.method_title --><!-- /ko -->

And here's what I've been using in the CSV files locally

"Free Shipping", "Test Shipping"

I've tried this CSV file in the following places with no luck:

app/code/i18n/en_US.csv
app/code/i18n/magento/checkout/en_US.csv
app/code/MyCompany/Translate/i18n/en_US.csv
app/code/design/frontend/Me/Mylook/i18n/en_US.csv
app/code/design/frontend/Me/Mylook/Magento_Checkout/i18n/en_US.csv

I've cleared cache, redeployed static content and deployed static content with just that language (en_US) and cleared browser cache multiple times.

I have tried to alter the js-translate.json file directly in pub/static and if I add the text it'll work, but that only works as long as I don't clear cache.

Any ideas before I do something horrible and try to update the text with javascript?

0

For translation is:

<!-- ko i18n: -->

not

<!-- ko text:  -->

in this file is ko text.

You can change in backend:

Stores => Configurations => Sales => Shipping Methods=> Free Shipping=> Title

  • Doesn't seem to work for me still. Cleared cache a few times. I feel like this should be the way to go (other translations in the file work) but it's not working for the knockout variable. – Jim Jun 19 at 20:46
  • Please check update – BartZalas Jun 19 at 20:54

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.