mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Sort languages by localized name at runtime
This commit is contained in:
parent
1830cd856a
commit
27a835a69c
@ -86,7 +86,7 @@ export class SettingsService {
|
||||
}
|
||||
|
||||
getLanguageOptions(): LanguageOption[] {
|
||||
return [
|
||||
const languages = [
|
||||
{code: "en-us", name: $localize`English (US)`, englishName: "English (US)", dateInputFormat: "mm/dd/yyyy"},
|
||||
{code: "de-de", name: $localize`German`, englishName: "German", dateInputFormat: "dd.mm.yyyy"},
|
||||
{code: "en-gb", name: $localize`English (GB)`, englishName: "English (GB)", dateInputFormat: "dd/mm/yyyy"},
|
||||
@ -102,6 +102,11 @@ export class SettingsService {
|
||||
{code: "ru-ru", name: $localize`Russian`, englishName: "Russian", dateInputFormat: "dd.mm.yyyy"},
|
||||
{code: "sv-se", name: $localize`Swedish`, englishName: "Swedish", dateInputFormat: "yyyy-mm-dd"}
|
||||
]
|
||||
|
||||
// Sort languages by localized name at runtime
|
||||
languages.sort((a, b) => { return a.name < b.name ? -1 : 1 })
|
||||
|
||||
return languages
|
||||
}
|
||||
|
||||
getDateLocaleOptions(): LanguageOption[] {
|
||||
|
Loading…
x
Reference in New Issue
Block a user