-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Localization support #6
Comments
👍 Your branch seems to be behind the Intake master branch, though. |
My branch is still on version 3 as I have not (yet) been able to update it and depending projects. I am still interested in contributing localization support to Intake 4. |
One reason why I haven't gotten around to localization is because I was hoping to make localization per-player, especially since the client send its language setting. However, realistically I don't know how many people care about that. |
That sounds like a nice idea. |
I care about that. On Fri, Aug 14, 2015 at 12:10 AM マルウェア [email protected] wrote:
|
Then the other issue is that there isn't really some localization project I'm aware of that's really suited for it (other than ones in Java web frameworks) so that would mean having some resource loading library specific to Intake, while the rest of your project might use something else. Unless, of course, I make a separate localization lib but I haven't really gotten around to that. |
Why not use Java's RessourceBundles? A What exactly did you have in mind for per-player localizations? I would have thought that an public interface ResourceProvider {
/**
* Gets a ResourceBundle that contains the localised strings applicable in the
* context it is called.
*
* @return the ResourceBundle
* @throws java.util.MissingResourceException if such a ResourceBundle does
* not exist
*/
ResourceBundle getBundle();
} is sufficient as it is left to the user to resolve the currently applicable |
It forces a ThreadLocal upon the user, although I suppose it's not a big issue. I suppose the other reason why i haven't gotten around to it is because I haven't added localization to WE yet. |
I just updated my fork for version 4 of Intake. Compared with my previous fork, I changed the approach:
There is also a new example for internationalized commands. @sk89q any chance to get these changes into the master version? |
Intake should provide some sort of support for localizations. This affects two fields:
ParametricException
). These might not need localization.ParametricBuilder
andCommandGraph
.ParametricBuilder
.On both fields, the support should be as flexible as possible and do not enforce any specific way of handling
Locales
on the user.Since I need localization support in MyWarp, I have implemented a limited localization support in my own Intake fork (i18n branch). I would be happy to contribute these changes in a PR so there is something to discuss about, if the general direction fits.
The text was updated successfully, but these errors were encountered: