Skip to content

Commit

Permalink
Small fix for getting the correct language
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Smolders committed Oct 17, 2013
1 parent d3abeaa commit 501af6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions views/setup.jade
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ html(lang="en")
$("[type=checkbox], [type=radio]").prettyForm();

var userLang = navigator.language || navigator.userLanguage;
userLang.replace(/-.*/,'');

console.log(userLang)
if(userLang.match(/nl|en|fr|da/g)){
$('input#language').val(userLang);
} else{
Expand Down

0 comments on commit 501af6f

Please sign in to comment.