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?


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>
| improve this answer | |
  • i'm doing this in knockout template not in phtml – jojo Feb 26 at 3:50
  • @jojo i have updated my answer – Rakesh Donga Feb 26 at 3:51
  • @RakeshDongan the title doesnt appear when i hover the element – jojo Feb 26 at 5:42

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.