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

Detect user language #148

Closed
mttmccb opened this Issue Aug 24, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@mttmccb

mttmccb commented Aug 24, 2016

I'm just wondering if this is possible, at the moment when I do the setup I set the default myself, but it would be much better to do this based on the users preference. Based on my initial searches it seems like it's possible find this out by looking in navigation.languages and getting the first in this list (some browser inconsistencies here).

In additional to this it would be nice to observe this and change the locale based on browser changes.

Thinking about this in a non-browser setting the way languages are detect may be different so a generic way of doing it would be handy.

Hopefully that makes sense.

@zewa666

This comment has been minimized.

Show comment
Hide comment
@zewa666

zewa666 Aug 25, 2016

Member

One of the reasons I chose i18next as a foundation for Aurelia-I18N is that it comes with a set of plugins for different tasks. One of them exactly being what you're searching for.

Member

zewa666 commented Aug 25, 2016

One of the reasons I chose i18next as a foundation for Aurelia-I18N is that it comes with a set of plugins for different tasks. One of them exactly being what you're searching for.

@zewa666 zewa666 closed this Aug 25, 2016

@mttmccb

This comment has been minimized.

Show comment
Hide comment
@mttmccb

mttmccb Aug 25, 2016

Thanks @zewa666, I'll check it out, clearly my google-fu failed me ;)

mttmccb commented Aug 25, 2016

Thanks @zewa666, I'll check it out, clearly my google-fu failed me ;)

@zewa666

This comment has been minimized.

Show comment
Hide comment
@zewa666

zewa666 Aug 25, 2016

Member

@mttmccb it would be a great help if you could post a short summary here, or if you're a blogger guy a link to a post about your findings

Member

zewa666 commented Aug 25, 2016

@mttmccb it would be a great help if you could post a short summary here, or if you're a blogger guy a link to a post about your findings

@mttmccb

This comment has been minimized.

Show comment
Hide comment
@mttmccb

mttmccb Aug 26, 2016

@zewa666 I will blog about it, hopefully this week if it goes smoothly :)

mttmccb commented Aug 26, 2016

@zewa666 I will blog about it, hopefully this week if it goes smoothly :)

@mttmccb

This comment has been minimized.

Show comment
Hide comment
@mttmccb

mttmccb Aug 30, 2016

I hope Using i18next language detection with Aurelia helps someone with this, it was pretty easy to get setup. There are a few other plugins I'll probably be trying out, like i18next-resource-store-loader.

mttmccb commented Aug 30, 2016

I hope Using i18next language detection with Aurelia helps someone with this, it was pretty easy to get setup. There are a few other plugins I'll probably be trying out, like i18next-resource-store-loader.

@zewa666

This comment has been minimized.

Show comment
Hide comment
@zewa666

zewa666 Aug 30, 2016

Member

Awesome, great post :plus1:

Member

zewa666 commented Aug 30, 2016

Awesome, great post :plus1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment