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
Honor browser's locale when able #175
Comments
I'd love to do this -- unfortunately we dont have the HTTP headers available: but do you think using the navigator language would be enough? |
Oh, thats a shame :( I don't think the navigator language would solve this, but it could be better than nothing - I tend to use applications in English, but that's because I do understand English. If I didn't, I surely would be using them in Spanish. But I think it would be better to take a shot with this service someone created for a scenario like this one. Or, if not, to just offer some more-global menu with the locales, accessible even when the demo dialog is shown. If we can't make a real good guess, just let the user choose :) |
Ah yeah, that's a great find! Relying on a 3rd party service isn't ideal / slightly worrisome but I'll probably:
sound good? |
We should test how it works, but, yes, sounds good. I don't know if it would be better to start the app in the navigator locale, maybe. And I think none of this should avoid offering the language selector in a more visible way, accessible even when the dialogs are shown. Maybe we could add that as a separate issue. |
Right now the UI updates to locale changes live, but dialogs will not since they are sliced out from the INTL strings before generation / display :( thats part of the reason why I kept the locale changer behind the dialog view -- basically you would change locale and not see a difference until you closed the dialog and launched something else. Intelligent defaulting though is a great start, lets try that |
We have a messy mapping between locale and language (and I haven't been as strict as I should when people add translations) but it's not the worst and definitely a better start. i still respect the URL params though if those are selected |
Hey, that's (even more) awesome!! :) About the mess, I think it would be best to have the two approaches: first try using the whole locale (ie, Today it just only concerns Chinese speakers, as there are two Chinese locales implemented (and with just only we are referring to a third of the world's population :)), but it more appear, it would be nice to handle them elegantly - say, an Spanish person would suffer a bit using my Argentinian translation. I'm having really too little time to help with this :/ But, what the heck, this is awesome, Peter :) |
Nah you're right @mgarciaisaia -- I shouldn't take shortcuts, and the differences for the chinese locales is pretty significant. It's tough because I receive an array like so some entries are a full locale string and others are just a language. But I just added a commit to handle the chinese chase for sure -- it adds another layer of mapping which is unfortunate but this whole project seems like a giant monkeypatch :P |
I do default to sorry for the long delay -- I seem to like doing issue sprints rather than constantly fighting off the slow drip of issues |
Hey, Petter, what you've already done is soooooo enough in so many ways that you shouldn't event think in apologies... :) Thinking about the ideal case, I think the point is if it's better to show the second chosen locale, or an alternative locale to the primary language. Say, if the user chose I don't even know if there's a generic answer to that question - I think most Spanish-speaking people would be good enough with a different locale (or, I think, English-speaking people would be the same, as there are subtle differences but the core of the language remains understandable) , but maybe that doesn't stand for Chinese-speaking people. @mikhailusov, @xielingwang, @twmht, any other opinion about this? |
Yeah it's a bit of a grey area. The differences between Since I'm still relying on language for all other locales, if a user choses |
Totally agree. I was just dreaming out loud - it would be super-duper-awesome to solve that, but what's already there is extra-cool anyway, so it's not a real priority, I think. |
The application always start in English. The user has to close the demo window, close the level selector, figure out that little circle is an Earth icon, understand it is a locale selector, pick his language, and just then starts understanding what he's being told.
It would be superb to default the language to the browser's preferred languages setting as much as it's possible.
The text was updated successfully, but these errors were encountered: