java - Is there Simple way to use String.toLowerCase() for 9 kinds of languages? -


i need treat 9 kinds of language in list below.

  • dutch
  • english
  • french
  • german
  • italian
  • portuguese
  • russian
  • spanish
  • ukrainian

for words in these languages need use tolowercase(). , know need use locale(country, language) parameter of function. then, have use specific locale each language, or there simpler way this?

you can construct locale iso 639 language code:

locale russian = new locale("ru"); 

there nice default locales use, example:

locale english = locale.english; locale french = locale.french; locale german = locale.german; locale italian = locale.italian; 

then use string#tolowercase() locale:

string lower = str.tolowercase(somelocale); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -