Setting Turkish and English locale: translate Turkish characters to Latin equivalents

前端 未结 5 1105
别跟我提以往
别跟我提以往 2021-02-04 02:29

I want to translate my Turkish strings to lowercase in both English and Turkish locale. I\'m doing this:

String myString=\"YAŞAT BAYRI\";
Locale trlocale= new Lo         


        
5条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-04 03:11

    I think this is the problem:

    Locale trlocale= new Locale("tr-TR");
    

    Try this instead:

    Locale trlocale= new Locale("tr", "TR");
    

    That's the constructor to use to specify country and language.

提交回复
热议问题