Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Setup browser language detector - Closes #556 #770

Merged
merged 9 commits into from
Oct 2, 2017

Conversation

slaweet
Copy link
Contributor

@slaweet slaweet commented Sep 25, 2017

This is the last part left from #556

@slaweet slaweet self-assigned this Sep 25, 2017
@slaweet slaweet requested a review from reyraa September 25, 2017 12:00
Copy link
Contributor

@reyraa reyraa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I personally find automatic translations annoying. John Resig seems to agree:

No automatic translations of content to the user’s native language. There is nothing worse than arriving at a site and being forced into a version that you can’t read either because it’s poorly translated, or you’re being GeoIP detected, or you’re on a computer whose language settings don’t match your own. If you visit a URL it should always be in the same language

  • In case we decide to do so, we have to modify locale files. presently I have a failing request for locales/en-US/common.json while I have it, only in another path.

@slaweet
Copy link
Contributor Author

slaweet commented Sep 26, 2017

I think that the "no automatic translations" is valid with websites, but Nano is a desktop app you're unlikely to install on another machine then your own.

I will look into a way to resolve locales like en-US and en-UK to en. Similarly for de.

@reyraa
Copy link
Contributor

reyraa commented Sep 26, 2017

I still find it annoying even in mobile apps (which run in the most personal medium), but that's a personal opinion, If other teammates consent, I'm down with it.

@slaweet
Copy link
Contributor Author

slaweet commented Sep 28, 2017

As for locales resolving (e.g. en-US to en) it works out of the box.
https://www.i18next.com/principles/fallback.html#locals-resolving
It first tries en-US and if not found goes to en

@slaweet
Copy link
Contributor Author

slaweet commented Sep 28, 2017

I gave it some thought and in the end implemented a language switcher dropdown on login page.
I believe it solves the problem of autodetect selecting a language that the user doesn't want.
At the same time, it doesn't add any extra step/clicks of choosing/confirming the language in most cases when the autodetect chooses what user wants.

@reyraa
Copy link
Contributor

reyraa commented Oct 2, 2017

Thanks Vit

@slaweet slaweet merged commit 93a4374 into development Oct 2, 2017
@slaweet slaweet deleted the 556-setup-i18n-framework branch October 2, 2017 08:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants