mirror of
https://github.com/v2rayA/v2rayA.git
synced 2026-11-20 23:02:25 +03:00
fix: problem that can not set correct locale if language is like en-US
This commit is contained in:
1 parent
474b5909bc
commit
19ad577f57
2 files changed
+2
-4
No files matched your search
@@ -35,7 +35,7 @@ code {
|
||||
}
|
||||
|
||||
html{
|
||||
@media screen and (max-width: 1024px) {
|
||||
@media screen and (max-width: 1400px) {
|
||||
font-size:0.9em;
|
||||
@media screen and (max-width: 767px) {
|
||||
font-size:0.8em;
|
||||
|
||||
@@ -9,9 +9,7 @@ Vue.use(VueI18n);
|
||||
// Create VueI18n instance with options
|
||||
let locale = "zh";
|
||||
for (let l of window.navigator.languages) {
|
||||
if (l.toLowerCase() === "zh-cn") {
|
||||
l = "zh";
|
||||
}
|
||||
l = l.split("-")[0];
|
||||
if (l in messages) {
|
||||
locale = l;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user