Wednesday, 10 July 2024

Java I18N

public static void useI18n() {
        Locale locale = Locale.of("de");
        ResourceBundle messages = ResourceBundle.getBundle("MessagesBundle", locale);
        System.out.println(MessageFormat.format(messages.getString("greeting"), "Tom"));
        System.out.println(messages.getString("farewell"));
    }

No comments:

Post a Comment

Putting myself in a suit

A useful usecase for nano banana. It is nice to iterate on my style like iterting on source code. This could be great for the next haircut, ...