Skip to content
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

Search localization #862

Open
andreadecorte opened this issue Apr 16, 2023 · 3 comments
Open

Search localization #862

andreadecorte opened this issue Apr 16, 2023 · 3 comments
Labels
bug Something isn't working internationalization

Comments

@andreadecorte
Copy link

Hi, first all of thanks for the great work done here!
I am quite interested in the internationalization part, and I noticed that search
https://github.com/ZeLonewolf/openstreetmap-americana/blob/main/src/search.js#L149
is not defining any accept language. Photon seems to support only a limited number of choices (en; fr; de), so I was wondering if there was any though in improving this somehow (komoot/photon#494 upstream bug doesn't look very promising).

For reference, Nominatim seems to supports many more languages out of the box.
I think that the expectation would be that when switching languages, search would also respect that choice by passing the language values.

An example using Italian, the search for the term Ratisbona should return the city of Regensburg (see Nominatim), as per its name:it tag. It is not returned by Photon.

@ZeLonewolf ZeLonewolf added bug Something isn't working internationalization labels Apr 16, 2023
@ZeLonewolf
Copy link
Member

I would welcome a PR from anyone that would like to work on this. The search component was constructed rather hastily and I'm sure there's lots of room for improvement.

@andreadecorte
Copy link
Author

I can take a look at this. As this is mostly a data issue, the idea would be to port the geocoder to use Nominatim API with the proper language as parameter. Is there any strong reason for which we would need to keep using Photon instead?

@ZeLonewolf
Copy link
Member

Yes, the goal of using Photon was to have a "search as you type" capability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working internationalization
Projects
None yet
Development

No branches or pull requests

2 participants