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

incorrect lang #410

Closed
tyrone98 opened this Issue Dec 26, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@tyrone98

tyrone98 commented Dec 26, 2015

I was using Simplified Chinese , but the content of the toolbar is Traditional Chinese .
In source code

       var userLanguage = navigator.language || navigator.userLanguage || 'en';

                var parts = userLanguage.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/);
                var lang = parts[1];
                var locale = parts[2];

                if (languages[lang + '-' + locale]) {
                    lang = lang + '-' + locale;
                } else if (!languages.indexOf(lang)) {
                    lang = 'en';
                }

languages variable is array , so languages[lang + '-' + locale ] always return null , replace to languages.indexOf( lang + '-' + locale )

Thanks

@ipeychev ipeychev added the bug label Dec 26, 2015

@ipeychev ipeychev added this to the 0.7.4 milestone Dec 26, 2015

@ipeychev

This comment has been minimized.

Contributor

ipeychev commented Dec 26, 2015

Thanks for the reporting!

@ipeychev ipeychev closed this in ee7c66d Dec 26, 2015

ipeychev added a commit that referenced this issue Dec 26, 2015

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