Skip to content

Commit e41a8fb

Browse files
committed
feat(config.js): Add "includes" to allow pl to match "pl-PL" lang code
1 parent 3b87118 commit e41a8fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/common/util/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function initializeConfig () {
121121
const languageId = window.localStorage.getItem('lang')
122122
? window.localStorage.getItem('lang')
123123
: navigator.language
124-
const active = languages.find(l => l._id === languageId) ||
124+
const active = languages.find(l => l._id.includes(languageId)) ||
125125
languages.find(l => l._id === 'en-US')
126126
if (!active) throw new Error('Language file is misconfigured!')
127127
// is an array containing all the matching modules

0 commit comments

Comments
 (0)