Skip to content
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 #436

Closed
polarapfel opened this issue Aug 7, 2018 · 3 comments
Closed

Localization #436

polarapfel opened this issue Aug 7, 2018 · 3 comments
Labels
Milestone

Comments

@polarapfel
Copy link

polarapfel commented Aug 7, 2018

How to best apply localization to options and their descriptions?

With the annotation based approached, defining the description argument in an @Option requires to use a constant. So, defining the help text and description puts the string literal into the code base, rather than allowing to pull them from a ResourceBundle that allows for easy localization.

Is there any way to change that? For example, as an idea, introduce a descriptionProvider argument, expecting a class reference that will instantiate that referenced class and pass the name of the option along, so that can be used as a key in a ResourceBundle?

thanks,

Tobias W.

And I just noticed this is a duplicate of #415 and #22

@remkop
Copy link
Owner

remkop commented Aug 7, 2018

Yes, I'm aware of this one, and it has been climbing in priority on the todo list. Hopefully for the 3.6 release.
If you really need this now, you need to use the programmatic API.

@polarapfel
Copy link
Author

@remkop Thanks for the response. I will stick with the annotations for now and keep an eye on this for future releases. Thanks for this well designed library, I really appreciate the thought that went into it. Itś hard to find something this easy for some other languages.

@remkop remkop added this to the 3.6 milestone Aug 26, 2018
@remkop remkop added the status: duplicate 👨🏻‍🤝‍👨🏻 A duplicate of another issue label Aug 27, 2018
@remkop remkop closed this as completed in 54f7cef Sep 6, 2018
@remkop
Copy link
Owner

remkop commented Sep 6, 2018

Fixed in master.
Support for ResourceBundles will be available from the upcoming 3.6 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants