How to get the current locale (API level 24)?

前端 未结 3 1297
广开言路
广开言路 2020-12-18 18:11

I was doing this way:

context.getResources().getConfiguration().locale

Configuration.locale is deprecated if target is 24. So I made this c

3条回答
  •  借酒劲吻你
    2020-12-18 18:26

    You could use Locale.getDefault(), which is the Java standard way of getting the current Locale.

提交回复
热议问题