I suspect that this might be something to do with the header that being sent (lang=‘en’) when onLoad. And later on this javascript doing it’s job by modified the tag within this loaded document (change into lang=‘th’) which is too late.
I exported my webflow site and then upload to another server.
Before i upload it, i had modify just HTML TAG in to LANG=‘TH’.
The snipcart beautifully change it’s locale into my local language.
If webflow could let me set my own HTML LANG Tag in each particular page, it would be wonderful since i have to host on webflow.
I have resolved my issue. This method works wonderfully.
All you have to do is.
1> Add Snipcart’s essential code to your SITE SETTING > Custom Code > Head
2> Then add this code to each specific page, goto your Page Setting > Header, in order to trigger Snipcart to dynamically change it’s shopping cart language into your desired language.
Don’t forget to change the"en" (English) into your desired language.
For example: $("html").attr("lang","fr"); is for french. $("html").attr("lang","es"); is for Spanish.
find your Language Code Here: Language Codes