Open Aaron1011 opened 9 years ago
Related: #482.
I don't think Glowstone needs "language packs" or anything more complicated than a lang file (if we decide to go through with this), but we should definitely make use of the translation components when the chat API is ready for widespread use within the server (among the many other places that require it...).
It would probably be wise to extract strings from the code- if for no reason other than to centralize them and to make it easy to update/modify them.
It'd be trivial to substitute in different languages at that point- the server could maintain dictionaries of strings for each language. If that proves to be too heavy, it could check player locales on login and dynamically load/unload the dictionaries as necessary. I doubt they'd be that heavy, though.
Any thoughts on that?
Probably also related to #86 as well.
We have the "standard" Minecraft messages that are translatable client-side, right? We should definitely support that out of the box since it should be fairly trivial to do.
I agree with @turt2live in that we only really need lang files for server-side translations, but if we wanted to generate translation files by extracting translatable strings from the code, we could probably find a way to use .po
and .mo
files for this as well - since they are the standard way of doing things.
Currently, Glowstone sends all messages in English to clients. However, the client supports changing the language text is displayed it. This is sent to the server as the
locale
inClientSettingsMessage
We should at least start planning how to internationalize text in Glowstone, based on the user's selected locale.