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
})