client: Add country flags to language selection

This commit is contained in:
Elian Doran 2024-08-11 08:24:15 +03:00
parent e086ba5eb4
commit aa5a7294df
No known key found for this signature in database
2 changed files with 5 additions and 3 deletions

View File

@ -32,7 +32,7 @@ export default class LocalizationOptions extends OptionsWidget {
for (const locale of availableLocales) {
this.$localeSelect.append($("<option>")
.attr("value", locale.id)
.text(locale.name));
.text(`${locale.flag} ${locale.name}`));
}
this.$localeSelect.val(options.locale);

View File

@ -135,11 +135,13 @@ function getSupportedLocales() {
return [
{
"id": "en",
"name": "English"
"flag": "🇺🇸",
"name": "English (United States)"
},
{
"id": "cn",
"name": "Chinese"
"flag": "🇨🇳",
"name": "Chinese (China)"
}
];
}