N
N
newdancer2019-09-02 11:46:21
Java
newdancer, 2019-09-02 11:46:21

How to implement language change in Java app?

How to implement language change in Java app?
Now I did it through the creation of translation files in the resource bundle. and get the method

private static String getResourceBundle(String key) {
        ResourceBundle resourceBundle = ResourceBundle
                .getBundle("com.example.test.translate", new Locale("en","US"),
                        new UTF8Control());
        return resourceBundle.getString(key);
    }

But how to implement dynamic language change?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cheypnow, 2019-09-05
@Cheypnow

Get ResourceBundle with different locales

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question