Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am having trouble implementing Asoul's custom client-side translation solution found here. The problem seems to be that the langPackUrl is incorrect. The url generated is something like "//cdn.shopify.com/s/files/1/0001/0002/0003/t/7/assets/locales.en.json?10850557867587876845". Are the locale json files located in the assets folder? Something is wrong here.
let langPackUrl = '{{ "locales..json" | asset_url }}'.replace('s..j', 's.' + lang + '.j')
$.ajax({ url: langPackUrl, type: 'GET', dataType: 'json', async: false })
Solved! Go to the solution
This is an accepted solution.
Found it.
GET /admin/themes/#{theme_id}/assets.json?asset[key]=locales/en.default.json
This is an accepted solution.
Found it.
GET /admin/themes/#{theme_id}/assets.json?asset[key]=locales/en.default.json
Is there also such an URL for the locale files of extensions?
In Canada, payment processors, like those that provide payment processing services t...
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