0

In Magento_Checkout/web/template/minicart/content.html there is a "mailto:info@website.com" used. Now I can translate the last piece by -- ko text: $t('info@website.com') --> <-- /ko --> into something like "info@website.co.uk". But how can I translate "mailto:info@website.com" into "mailto:@website.co.uk"? So that I can use it for a multistore website. I believe it is in JS knockout: see the code below:

    <!-- ko ifnot: getCartParam('summary_count') -->


    <div class="c-minicart__footer__right col-8">
        <i class="icon-envelope"></i>
        <a href="mailto:info@website.com">info@website.com</a>
    </div>
    <!-- /ko -->
2
  • This is not about translating, you should overwrite or directly edit the file
    – Jimmy
    Apr 2 at 2:03
  • do you mean you want the frontend to dispaly info@website.co.uk? and yet the email value to be info@website.com? Apr 2 at 8:14
0

You can use so tag:

<!-- ko ifnot: getCartParam('summary_count') -->
<div class="c-minicart__footer__right col-8">
        <i class="icon-envelope"></i>
        <a href="#" attr="href: $t('mailto:info@website.com')">>
                <translate args="'info@website.com'"/>
        </a>
</div>
<!-- /ko -->
1
  • thanx! This works perfect! It's easy if you know it :) Apr 2 at 16: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.