-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Configuration Localisation #284
Comments
I probably have asked this question before, but how exactly do we know the language to be localized? Although this will be a mess, here's actually one solution:
The hard part here of course is number 3. This is the only behavior that I can see working; the configuration will have to be English initially, as there's no good reliable way to check the localization on a server. Like the server does not have to be located in the same region as that of the server owner. I really see no other reliable way, but let me see if I can find system properties that might give something interesting |
There is apparently the Locale.getDefault(); But I'm unsure how reliable it is. It's quite hard to know what the system owner wants from that setting. For example I myself would like the configuration to be in English, even though my locale would be Swedish. There's no way for the system to know that. Therefore I suggest not using that property |
The migrator has some code which ensures that the comments of the updated config.yml is used, but values are taken from the user's configuration, after the keys have been updated. It should be possible to do the same for changing the configuration language. We should be able to copy (or generalize) that code from the migrator and use the user's current configuration as the input, and the translated configuration file as the one to take comments from. |
Yeah, I suppose it's mostly copy and paste, but I'm still scared to touch that code. But what must be done, must be done. |
When we get around to a full release, we will need to handle config localisation for non-english distribution channels.
The config system is currently finicky, so it will probably be a slight pain to implement.
When we get around to it, this file should help:
config_foreign_format.zip
The text was updated successfully, but these errors were encountered: