Skip to content

Nearby map is not localized #2335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nicolas-raoul opened this issue Jan 23, 2019 · 6 comments
Closed

Nearby map is not localized #2335

nicolas-raoul opened this issue Jan 23, 2019 · 6 comments

Comments

@nicolas-raoul
Copy link
Member

Steps to reproduce:

  1. Put Android's locale to French
  2. Open the app
  3. Tap Nearby
  4. Scroll all the way to Paris
  5. All labels are in English. It is not just labels missing from OpenStreetMap, see screenshot, these obviously have French labels.

Was also the topic of the closed issue #669

screenshot_20190123-130158

@zhao-gang
Copy link
Contributor

@nicolas-raoul Hi. I think this may be because wikimedia tiles are not correctly loaded into nearby map. You can see the nearby map with wikimedia tiles in above PR.

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Feb 22, 2019

Here is how the Google Maps website shows London to a French-language user:
screenshot from 2019-02-22 18-14-24
As you can see, a lot of labels (at least the major ones) are in French, even if this is an English city.

It is even more important for an American visiting Japan, or a Russian visiting Tunisia.

This is the ideal we should aim for. OpenStreetMap actually has labels in a lot of languages.

@zhao-gang
Copy link
Contributor

@nicolas-raoul I found that Mapbox android sdk has a localization plugin https://github.com/mapbox/mapbox-plugins-android/tree/master/plugin-localization. I will see if it can help with the localization problem you mentioned.

@zhao-gang
Copy link
Contributor

After I added the localization plugin, it seems that with mapbox Style.OUTDOORS style, the labels will change with system language settings; but with custom style with wikipedia tiles, the labels are the places' language(say, London with English, Paris with French), without regarding to the system language settings. One advantage of the custom wikipedia style is that it has more places than mapbox(see screenshot). Now I don't have a way to use wikipedia style and at the same time support system language settings. I don't know if there's a way to do this. Hope someone familiar with this can point it out.

Updated the related PR to use localization plugin and mapbox tiles.

mapbox tiles with French wikimedia tiles with French
mapbox-london-french wikipedia-london-french

zhao-gang added a commit to zhao-gang/apps-android-commons that referenced this issue Feb 24, 2019
…pp#2335)

Update mapbox sdk version to 7.1.2 and add localization plugin. With
this change the nearby map can display place labels in android system
language which can be changed by the user.
@nicolas-raoul
Copy link
Member Author

The screenshot on the left (in the post just above) looks like what would be ideal I think (in terms of language). For privacy reasons, I am afraid we can not use mapbox tiles though (that would reveal the user's IP address to a third party).

@zhao-gang
Copy link
Contributor

The best solution would be that wikimedia tiles support mapbox localization plugin. So we can have both :-) I checked that in current Google Play store's Commons app we actually are using mapbox tiles, the wikimedia tiles are not used indeed(Because of the code that changed to wikimedia tiles somewhat does not do its work). To distinguish these two tiles, mapbox tiles are a little brighter than wikimedia tiles(See above screenshots).

zhao-gang added a commit to zhao-gang/apps-android-commons that referenced this issue Mar 15, 2019
zhao-gang added a commit to zhao-gang/apps-android-commons that referenced this issue Mar 15, 2019
…pp#2335)

Wikimedia tiles support adding a "?lang=xx" suffix to tiles url to set
preferred language. Use this feature to set the preferred language to
user's default Locale.
zhao-gang added a commit to zhao-gang/apps-android-commons that referenced this issue Mar 15, 2019
…pp#2335)

Wikimedia tiles support adding a "?lang=xx" suffix to tiles url to set
preferred language. Use this feature to set the preferred language to
user's default Locale.
zhao-gang added a commit to zhao-gang/apps-android-commons that referenced this issue Mar 15, 2019
…pp#2335)

Wikimedia tiles support adding a "?lang=xx" suffix to tiles url to set
preferred language. Use this feature to set the preferred language to
user's default Locale.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants