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

useLanguage #31

Open
torifat opened this issue Oct 26, 2018 · 3 comments
Open

useLanguage #31

torifat opened this issue Oct 26, 2018 · 3 comments

Comments

@torifat
Copy link

torifat commented Oct 26, 2018

https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language

const language = useLanguage();
@jamiebuilds
Copy link
Member

What benefit does this have over just accessing navigator.language? Is there an event for the user changing their language?

@torifat
Copy link
Author

torifat commented Oct 27, 2018

Is there an event for the user changing their language?

Officially there is but I have to check the browser support.

@jamiebuilds
Copy link
Member

Ah, looks like its in a few places: https://developer.mozilla.org/en-US/docs/Web/Events/languagechange

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

No branches or pull requests

2 participants