https://github.com/leoando/android13-per-app-language-preferences-samples
Per-app language preferences (Android 13+)
https://github.com/leoando/android13-per-app-language-preferences-samples
android-java android-kotlin android13 material2 tiramisu
Last synced: 3 months ago
JSON representation
Per-app language preferences (Android 13+)
- Host: GitHub
- URL: https://github.com/leoando/android13-per-app-language-preferences-samples
- Owner: LeoAndo
- Created: 2022-02-21T23:42:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-13T02:09:49.000Z (about 2 years ago)
- Last Synced: 2025-01-21T11:13:42.974Z (4 months ago)
- Topics: android-java, android-kotlin, android13, material2, tiramisu
- Language: Java
- Homepage:
- Size: 1.05 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# overview
Per-app language preferences (Android 13+)
https://developer.android.com/about/versions/13/features#app-languages
https://developer.android.com/about/versions/13/features/app-languages# API
https://developer.android.com/reference/android/app/LocaleManager#getApplicationLocales()
https://developer.android.com/reference/android/app/LocaleManager#setApplicationLocales(android.os.LocaleList)# dev memo
端末の言語設定に依存させたい場合は、`LocaleList.getEmptyLocaleList()`を使ってリセットする
setApplicationLocalesでアプリ内の言語設定を行えば、端末の言語設定に影響受けない# capture OS 13
## Captureしてませんが、OS13未満のデバイスでも動作します!
![]()