osu-framework
osu-framework copied to clipboard
The default user language should be taken from the system language
I think this is pretty important to get working. Bit of an oversight until now.
I did some work about this several days ago. Things to mention:
- The framework sets default locale config to empty string. This sets
CurrentCulture
to neutral and overrides any user preference. - The game doesn't handle variations of culture. The system default culture is usually with country/region code (
en-US
,zh-CN
etc), but in osu we use non country/region code version (en
,zh
). It should use culture parent chain instead of string StartsWith, to handle complex scenarions likezh-CN
->zh-Hans
->zh
.
If it helps I can provide the fallback logic stable is using for deciding which culture to set. I know it does something similar to what you are proposing here.
Fixed in https://github.com/ppy/osu-framework/pull/5505. But do note that the language is taken from the date and time format, and not the system UI language.