Is there Simple way to use String.toLowerCase() for 9 kinds of languages?
java
Solution
You can construct a `Locale` from an ISO 639 language code:
Locale russian = new Locale("RU");
There are nice default locales for you to use, for example:
Locale english = Locale.ENGLISH;
Locale french = Locale.FRENCH;
Locale german = Locale.GERMAN;
Locale italian = Locale.ITALIAN;
Then just use `String#toLowerCase()` with the locale:
String lower = str.toLowerCase(someLocale);
Problem
I need to treat 9 kinds of language in a list below. - Dutch - English - French - German - Italian - Portuguese - Russian - Spanish - Ukrainian For words in these languages I need to use `tolowercase()`. and I know I need to use `Locale(country, language)` as a parameter of the function. Then, do I have to use specific locale for each language, or is there simpler way to do this?