Implement switching language (but doesn't persist)

This commit is contained in:
Alf Sebastian Houge
2023-07-18 22:48:36 +02:00
parent 14968013dd
commit 302bdd2222
6 changed files with 34 additions and 16 deletions

View File

@@ -4,6 +4,7 @@ type LanguageModel struct {
Emoji string `json:"emoji"`
Name string `json:"name"`
NameNative string `json:"nameNative"`
Shorthand string `json:"shorthand"`
}
func GetLanguageMastersList() []LanguageModel {
@@ -12,10 +13,12 @@ func GetLanguageMastersList() []LanguageModel {
Emoji: "🇬🇧",
Name: "English",
NameNative: "English",
Shorthand: "en",
}, {
Emoji: "🇩🇪",
Name: "German",
NameNative: "Deutsch",
Shorthand: "de",
},
}
}

View File

@@ -6,6 +6,7 @@ type UpdateSettingModel struct {
Currency string `json:"currency" form:"currency" query:"currency"`
DateFormat string `json:"dateFormat" form:"dateFormat" query:"dateFormat"`
DistanceUnit *db.DistanceUnit `json:"distanceUnit" form:"distanceUnit" query:"distanceUnit" `
Language string `json:"language" form:"language" query:"language"`
}
type ClarksonMigrationModel struct {