Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
All the translator app don't consider the hard coded text when translating from a language to an other, so i created a blog like this :
1/in the liquid template i put this :
{{ 'blog.comment.email' | t }}
2/in the locales/en.default.json i put this :
{
"blog":
{ "comment": { "email": "Your email" } }
}
it work well and it traduce the "your email" BUT my probleme is that i want this texte to be in BOLD, Can anyone help me with this ?
many thanks
add '_html' suffix to your key in locale json file and use 'strong' or 'b' tags to make text bold you wanted.
For example:
"blog":
{ "comment": { "email_html": "Your <strong>email</strong>" } }
}
Don't forget to change your 'email' key to 'email_html' in your relevant liquid file.
Reference: https://shopify.dev/docs/themes/architecture/locales/storefront-locale-files#prevent-translations-fr...
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024