Default to en if browser does not provide a language

This commit is contained in:
Alexander Do 2018-04-07 02:53:00 +00:00
parent df921ad658
commit c6950b9b56

View file

@ -441,7 +441,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
// auto-select language based on browser settings
if (newLanguage.length === 0) {
newLanguage = (navigator.language || navigator.userLanguage).substring(0, 2);
newLanguage = (navigator.language || navigator.userLanguage || 'en').substring(0, 2);
}
// if language is already used skip update