2

i have one legacy module with .html file, which contains label which i'd like to translate. Originally it looks like this:

<label class="label" for="carrier_department"><span>text to be translated</span></label>

i have changed it to:

<label class="label" for="carrier_department"><span data-bind="i18n: 'text to be translated'"></span></label>

but this is not helped, it's still not translated. p.s. cache cleaned, re-deployed, translation exist in csv file. any ideas?

1
  • cache did the trick, as usual((((
    – bofh
    Commented May 4, 2018 at 22:07

1 Answer 1

2

The below code works for me

<h4 data-bind="i18n: 'Shipping Instruction'"></h4>

Hope it will work for you. In your case it should be

<label class="label" for="carrier_department"><span data-bind="i18n: 'text to be translated'"></span></label>

For more details, please have a look the below link: https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/translations/translate_theory.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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