I am trying to fetch the translated text from a translation supported ressource, and use it in "theme.js" file.
When I look at tutorial https://shopify.dev/tutorials/develop-theme-localization-organize-translation-keys it looks like, it should be possible to write:
var link = '<a href="#">' + layout.navigation.more_html + '</a>';"
But it does not work. In liquid files, this works: {{ 'cart.general.taxes_and_shipping_at_checkout' | t }}
Do I have to "preload" the translated in the theme.strings.xxxxxx ?
Thanks
Martin
User | Count |
---|---|
13 | |
12 | |
10 | |
8 | |
8 |