[android]Enable per-app language #3584
No reviewers
Labels
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
No due date set.
Dependencies
No dependencies set.
Reference: organicmaps/organicmaps-tmp#3584
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "language"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR add ability to change app language only for OM on devices on Android 13.
More information here
This PR cannot be merge because bump appcompat to 1.6.0 need update app theme -> check this organicmaps/organicmaps#3537 (comment)
When i changed language in Android settings and i back to OM, app language have changed. But to update maps language we need to restart app. @biodranik Is it ok for you, i'm not sure user change language every day and restart app to update map is not big inconvenient.
organicmaps/organicmaps#3586
It is ok, maybe we can show some kind of hint about that? Or at least add it into the FAQ.
What about adding this?

Are you sure about en-rGB? Should it be en-GB, as in the example?
Are you sure about these? In the example they use zh-Hant and zh-Hans. Can you please test if it works properly?
ditto
ditto
ditto
Check this
I think the real interest is to reduce size of app by remove unused strings in libraries.
Edit:
I not sure, it's necessary to add something in FAQ (I have discover FAQ in app today :) ) because this feature is only available on devices used Android 13.
About map languages not synchronised when you changes language, maybe you can implement this with organicmaps/organicmaps#391
Did you test these languages on your device? Did they work?
I have test with english
-en_GB

What about Chinese?
Examples:
pt
delete (bottomsheet on map)=Eliminar
pt_BR(Brazil)
delete=Apagar
Examples:
fr (France)
Translittération en latin (App settings)
fr_CA (Canada)
Translittération vers l'alphabet latin (App settings)
Examples:
nit: new line
@ -0,0 +39,4 @@
<locale android:name="uk" />
<locale android:name="vi" />
<locale android:name="zh" />
<locale android:name="zh-HK" />
Are you sure here? I can see the following names in res/values:
zh-Hans

zh-Hant

@ -0,0 +39,4 @@
<locale android:name="uk" />
<locale android:name="vi" />
<locale android:name="zh" />
<locale android:name="zh-HK" />
add zh-HK or zh-rHK have none difference, because string name file contains
r
is just use tu specifie when you have some strings only for country.Examples:
If i want translate all strings for Great Britain, i create res file with this name values-en-GB
If i want only translate special strings for Great Britain, i create res file with this name values-en-rGB. (And strings not translate in this file are take from values-en or values.
I have test with
r
and without, 0 difference.https://developer.android.com/guide/topics/resources/localization#avoid-creating-more-resource-files-and-text-strings-than-you-need
@ -0,0 +39,4 @@
<locale android:name="uk" />
<locale android:name="vi" />
<locale android:name="zh" />
<locale android:name="zh-HK" />
I've read the docs and confirm that the new locale format should work. We use the old one, pre-Android 7 for our resources because we need to support Android 5 and 6.