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

Getting different languages every time I call getDataFromCoordinates() #11

Open
dpedrinha opened this issue Aug 2, 2022 · 3 comments
Open

Comments

@dpedrinha
Copy link
Contributor

dpedrinha commented Aug 2, 2022

Sometimes I call getDataFromCoordinates() and I get results like state and city in the local language (with accents for instance and with the local names) and some times I get the result in English (no accents and the English names).

Thing is, my device language is English, but my location is different from any English speaking country. That is on purpose precisely to test for devices of people traveling.

Is there a way to set the language I want to use or maybe always use the language of the coordinates?

For example, Rome is Roma in Italian. I'm in that situation where some values are being stored in the db in one language (country=Roma) but the users can't find any result because their location is being returned in English (country=Rome) even though they are in Rome/Roma and they saved the place in the database using the same device.

@dpedrinha
Copy link
Contributor Author

I was looking into other geocoding plugins and this one is clearly the best one.

But unfortunately it has this language problem. Some other plugins implement a language_COUNTRY code to get the results. If this one did the same, it would be by far the best one.

@flutterbuddy1
Copy link
Owner

flutterbuddy1 commented Aug 4, 2022 via email

@dpedrinha
Copy link
Contributor Author

dpedrinha commented Aug 4, 2022

We will provide as soon as possible. In next update you will get language feature or more.

On Thu, 4 Aug, 2022, 8:22 pm dpedrinha, @.> wrote: I was looking into other geocoding plugins and this one is clearly the best one. But unfortunately it has this language problem. Some other plugins implement a language_COUNTRY code to get the results. If this one did the same, it would be by far the best one. — Reply to this email directly, view it on GitHub <#11 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASWKAX6ZBWJH777YO55FCSDVXPKJ3ANCNFSM55JK2Y6A . You are receiving this because you are subscribed to this thread.Message ID: @.>

Thank you for your answer.

But it turns out your code was very well written and organized so I made the changes and commited a pull request. Very simple change actually.

I just added an optional language attribute to both requests. I tested it plenty and it's working perfectly with or without the language attribute. Being optional, it shouldn't break any previous apps using your plugin.

Please check #12

Thank you for sharing this plugin and now it's definitely the best geocoding plugin on pub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants