We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Call the withMessages(Map<String, String>) method on the generated parser, with a map created from the bundle:
withMessages(Map<String, String>)
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("myResource"); DeleteCommand command = new DeleteCommandParser().parse(args) .orElseThrow(notSuccess -> StandardErrorHandler.builder(notSuccess) .withMessageMap(toMap(bundle)) .build().handle()); // ... } private static Map<String, String> toMap(ResourceBundle bundle) { return Collections.list(bundle.getKeys()).stream() .collect(Collectors.toMap(Function.identity(), bundle::getString)); }