get the application's resources languages

后端 未结 11 1131
庸人自扰
庸人自扰 2020-12-02 23:30

Is it possible, at runtime, to know which resources languages are embedded in my app?

i.e the presence of this folders:

values-en
values-de
values-fr         


        
11条回答
  •  孤街浪徒
    2020-12-03 00:14

    LocaleList or LocaleListCompat are one of the ways you could get the languages supported by your application.

    LocaleList was introduced in API 24.

    The thing to consider when using LocaleListCompat is that for API < 24 only the first language tag will be used.

提交回复
热议问题