Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language variant priority is not deterministic #204

Open
System-Glitch opened this issue Jun 11, 2024 · 0 comments
Open

Language variant priority is not deterministic #204

System-Glitch opened this issue Jun 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@System-Glitch
Copy link
Member

Bug report

Version: v5.0.0
Environment: go version go1.22.1 linux/amd64
Reproduces: sometimes

Currently, the first available language variant (e.g.: US in en-US) in lang.DetectLanguage() is random because keys are not ordered. We should make language detection deterministic and maybe add an option for developers to define a custom language variant priority, such as a config entry app.languagePriority.

No good solution has been identified yet to solve this problem gracefully, feel free to suggest.

@System-Glitch System-Glitch added the bug Something isn't working label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant