GlowstoneMC / Glowstone-Legacy

An open-source server for the Bukkit Minecraft modding interface
Other
363 stars 120 forks source link

Internationalization support #544

Open Aaron1011 opened 10 years ago

Aaron1011 commented 10 years ago

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 in ClientSettingsMessage

We should at least start planning how to internationalize text in Glowstone, based on the user's selected locale.

turt2live commented 10 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...).

Etherealflux commented 10 years ago

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?

gdude2002 commented 10 years ago

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.