Implement localization

This commit is contained in:
2025-01-12 00:17:19 +01:00
parent 2788afe822
commit d43e961184
16 changed files with 621 additions and 31 deletions

12
app.go
View File

@@ -125,3 +125,15 @@ func (a *App) SelectDirectory() (res StringResponse) {
res.Data = path
return
}
func (a *App) GetLocale() string {
if settings.Locale == "" {
return "en"
}
return settings.Locale
}
func (a *App) SetLocale(locale string) error {
settings.Locale = locale
return SaveSettings(*settings)
}