Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add language autodetection strategy based on <html lang> #115

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

OndraM
Copy link
Contributor

@OndraM OndraM commented Nov 22, 2021

Ref #114 .

First, internal value of _config.auto_language is now normalized to be either:

  • browser (will use _getBrowserLang()) - also true is classified as browser, to keep backward compatibility
  • document (will use document.documentElement.lang)
  • or null (disable auto detection), which is default in all other cases (including false for backward compatibility). I choose null over false to be more type strict - now the value of auto_language is basically nullable string.

After this, the current_lang is determined. I also refactored this to be in a separate method.

@orestbida orestbida merged commit 3958233 into orestbida:master Nov 23, 2021
@OndraM
Copy link
Contributor Author

OndraM commented Nov 23, 2021

@orestbida Thanks, any idea when you plan to get this tagged and released?

@OndraM OndraM deleted the feature/auto-language-document branch November 23, 2021 15:43
@orestbida
Copy link
Owner

Ideally I'd like to work on all the remaining issues inside the v2.7 milestone except #85, since it's a big feature and I don't have a lot of time to work on it.

I'd release v2.7 by the end of the week (optimistic) but - if you need it sooner - I could also skip the remaining issues and release instead something like a "v2.7-rc1".

@OndraM
Copy link
Contributor Author

OndraM commented Nov 23, 2021

If you'd have a chance to release ty already merged features it sooner, it would be great. The rc version sounds nice 👍

Thanks for your work, really appreciate it!

@tillsanders
Copy link
Contributor

tillsanders commented Nov 23, 2021 via email

@orestbida
Copy link
Owner

@OndraM It's up!

@tillsanders
Copy link
Contributor

npm install vanilla-cookieconsent@2.7.0-rc1 or npm install vanilla-cookieconsent@next 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants