The problem is that the google maps retain the language it has when it was first open. For example, I have 2 activities (Activity A and Activity B). The Activity A consist of settings page where I change the language to that activity. Note that it's not the system language, but using the Locale.setDefault()
. This successfully translates my app, no problem with the text, except the google maps language. The Activity B consists of the MapFragment where I show the map.
When I start the MapActivity on English language, the map shows the English language. When I go back to Activity A and change the language, then open again the MapActivity, the map retains the English Language as its like saving its instance from a background process.
My investigation is that, the google maps language was based on the first language the maps rendered and it will retain unless the app is completely close.
Can someone help me with this problem to change the google maps language base on the Locale set in my Settings page. What I've tried so far is to clear the cache(my app and the google services) and also destroying the fragments by activating the useViewLifeCycleInFragments
of the SupportMapFragment
and use the fragment life cycle.
Thanks.
Update
Still cant get to translate the Google Maps:
What I have tried:
Close the google play services process -> not working (impossible)
Use 2 Map Fragment -> not working, it will load same maps