0

I have href html tag that looks like this in my knockout html template

  <a data-fancybox data-src="#price_policy" href="javascript:void(0);" title="Shipping Cost" data-bind="i18n: 'Shipping will be available in your area'"> </a>

this html tag has title property that i need to translate, how can i achieve this?

1 Answer 1

0

you can do this way ..

<a data-fancybox data-src="#price_policy" href="javascript:void(0);" attr: {title: i18n:'Shipping Cost'} data-bind="i18n: 'Shipping will be available in your area'"> </a>
3
  • i'm doing this in knockout template not in phtml
    – jojo
    Commented Feb 26, 2020 at 3:50
  • @jojo i have updated my answer Commented Feb 26, 2020 at 3:51
  • @RakeshDongan the title doesnt appear when i hover the element
    – jojo
    Commented Feb 26, 2020 at 5:42

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.