Skip to content

Commit

Permalink
Merge pull request #181 from willvincent/fix-lang-selection
Browse files Browse the repository at this point in the history
Issue #170: Fix language selection
  • Loading branch information
rafajaques authored Oct 28, 2016
2 parents e37c11c + f24f90d commit 07b7276
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/js/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ $.each(i18n.fullLocaleList, (i, v) => {
});

// Try to figure out user's language
$('#locales-list').val(app.getLocale() ? app.getLocale() : 'en');
if (app.getLocale() in i18n.fullLocaleList) {
$('#locales-list').val(app.getLocale());
} else if (app.getLocale().split('-')[0] in i18n.fullLocaleList) {
$('#locales-list').val(app.getLocale().split('-')[0]);
} else {
$('#locales-list').val('en');
}

/* Go button action */
$('#go').click(() => {
Expand Down

0 comments on commit 07b7276

Please sign in to comment.