Cannot change language to vi (vietnamese)

Hi everyone

I am trying to change my snipcart language to vi.json (Vietnamese) but it doesn’t work. I checked and the vi.json file on Github has the correct naming scheme base on the ISO 639-1 standard.

I tried to troubleshoot by setting it to fr.json and it worked for that.

So I am really not sure what the issue is. Here is the script

<script>
document.addEventListener('snipcart.ready', function() {
    Snipcart.api.session.setLanguage('vi');
});
</script>

Any help is appreciated

Hi @MorningTide,

In the current release (v3.2.0), the locale is named vn.

You’ll be able to use the correct naming, vi, starting from the next release.

Cheers!

Thank you for swift reply.

I tried “vn” as well but it also doesn’t work

I have tried
“vi”
“vi.json”
“vn”
“vn,json”.

Whenever I switch to any change above, it just shows up as the default “en”

I wasn’t able to replicate the issue. Using Snipcart.api.session.setLanguage('vn') seems to work as expected.

What version of the cart are you using? It should be available starting from v3.0.28.

Hi Michael

You were correct, I was using an old version of Snipcart. When I switched to the newest version 3.2.0, I am now able to change the language. Thank you so much.

But my old CSS file is no longer working, I guess it’s because of the new styling theming features.

Thank you for your help :smiley: