Open leohihimax opened 8 years ago
Maybe @jeresig can answer to this (he wrote/forked this code)
I've just run into the same problem after upgrading. We use uppercase for the country part, which now means it won't match f.ex. zh-CN. Not sure how this could be resolved, but ideally it would case-insensitive.
Some methods like
setLocaleFromQuery()
,setLocaleFromCookie()
will convert the locale to lower case. I see a lot of projects use uppercase letter in their i18n locales file name likeen-US.json
,zh-CN.json
. Also, the accept language in HTTP request header use the uppercase letter in the locale likeen,zh-CN;q=0.8,zh;q=0.6
. So my question is why those methods convert locales to lowercase? Why not just keep the original case?