How to get Locale from its String representation in Java?

前端 未结 12 1064
慢半拍i
慢半拍i 2020-12-08 00:06

Is there a neat way of getting a Locale instance from its \"programmatic name\" as returned by Locale\'s toString() method? An obvious and ugly solution would b

12条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-08 00:31

    Old question with plenty of answers, but here's more solutions:

    • Get Locale From String
    • Converts a String to a Locale

提交回复
热议问题