Localization doesn't work anymore

Hey,

I added this code to my website

<script>
    document.addEventListener('snipcart.ready', function() {
        Snipcart.api.session.setLanguage('de', {
            "cart_summary": {
              "taxes": "20% Umsatzsteuer",
              "taxes_included_in_price": "Alle Artikel enthalten 20% Umsatzsteuer."
            }
        });
    });
</script>

and now the cart doesn’t translate anymore. Can I write this somehow without setting the language?

Thank you
All the best
Yulia

Hi @ligeiaofulthar,

You need to go through the JavaScript API to edit the localization yourself.

That said, unless I’m missing something, the snippet you’ve provided should work.

Could you send us a link to your website? We’ll take a look.

Cheers!

Hey,

here’s the test server: Yulia.app

Thanks for the help!
All the best
Yulia

Hi ligeiaofulthar,

I just took a look at your test server, and it seems everything looks fine, am I wrong ?

If not, please provide some screenshots to help us understand better what is still problematic.

Cheers !

Hey @Chuck,

Attached you’ll find a screenshot. The problem is I click on the english version of the site → the cart and checkout shows up in german. If I remove the code that changes “Mehrwertsteuer” to “20% Umsatzsteuer” the cart picks up the localization.

So the problem is apparently with the code mentioned at the beginning of this thread.

Is the problem now clearer?
Thank you
all the best
Yulia