luci-base: improve language detection
authorJo-Philipp Wich <jo@mein.io>
Sun, 13 Aug 2017 13:54:01 +0000 (15:54 +0200)
committerJo-Philipp Wich <jo@mein.io>
Sun, 13 Aug 2017 13:55:22 +0000 (15:55 +0200)
commit15cb504b446add1d62bb318c683ed2cf78cd7041
tree30338b671b656b7a1c3ebd83c1cdbb3167a84b55
parentf03bee5a91b09b81b4de9536d5dacdc670c7fb26
luci-base: improve language detection

Properly deal with client accept languages containing a culture identifier
such as "zh-CN" or "pt-BR".

Fixes #1226.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-base/luasrc/dispatcher.lua