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...
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025