orestbida / cookieconsent

:cookie: Simple cross-browser cookie-consent plugin written in vanilla js

Home Page:https://playground.cookieconsent.orestbida.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: `CookieConsent.setLanguage` not working

jackdeguest opened this issue · comments

Expected Behavior

I expect the cookies consent preference to be using the language specified in argument to CookieConsent.setLanguage, such as: CookieConsent.setLanguage("en")

Current Behavior

Currently, calling CookieConsent.setLanguage has no effect on the language of the cookies settings pane, or the notification pane.

Steps to reproduce

  1. Ensure your browser language is in another language than en-GB
  2. Execute CookieConsent.setLanguage("en"); CookieConsent.showPreferences();
  3. The settings pane will still be displayed in whatever is your web browser preferred language and not the one specified with setLanguage

Proposed fix or additional info.

No response

Version

v3.0.0-rc.17

On which browser do you see the issue?

Firefox

Just like #607, this also works fine on my end. Please provide a demo with the issue.

I could pinpoint the source of the error here as well, and it was my mistake. I was declaring the language files en-GB, fr-FR and ja-JP, but I was calling CookieConsent.setLanguage('ja',true);

You can close this issue.