-
Notifications
You must be signed in to change notification settings - Fork 99
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
GOOGLE_MAPS_DEFAULT_LANGUAGE #45
base: master
Are you sure you want to change the base?
Conversation
This constant can be used to set the default language of the google map widget displayed. I think it can be useful. In my case, I'm working with an english client, but work in France, so the google maps API sets the Google Maps iframe to french language (based on my location). I would like to be able to add items to the database that are in English, so I need to set the Google Maps widget language to English. Hope this helps ! To use it, you simply have to set the GOOGLE_MAPS_DEFAULT_LANGUAGE in your settings.py file (list of languages: https://developers.google.com/maps/faq#languagesupport)
Added a GOOGLE_MAPS_DEFAULT_LANGUAGE constant
Hi @madisona Any news on this PR? It really is useful IMHO, as explained in my first comment. Thanks! |
Hi @Synkied - thanks for your contribution. I agree adding the ability to specify language is useful. Will you re-work it so it isn't a breaking change and existing users don't need to add the setting if they don't want? |
@Synkied also - you don't need a new branch and new PR - just make your changes and push to your existing branch and github should update this pull request. |
Hi @madisona Ok thanks, I'll do that, I'm a bit new in contributing to projects! 👍 |
Hi @madisona, I think this should be better, current users won't have to specify the new setting in their settings file. It will automatically take their location language. |
@Synkied thanks! This is indeed a much better start. the On the test cases - I'd like to see one test case testing each possible scenario specifically. For example - Lastly - from the Google Maps documentation it says "By default, the Maps JavaScript API uses the user's preferred language setting as specified in the browser..." When grabbing the user's locale, don't we need to get it from the request object |
Any news on this PR ? |
I would really like some help on the test cases if someone got time to do it? |
This constant can be used to set the default language of the google map widget displayed.
I think it can be useful.
In my case, I'm working with an english client, but work in France, so the google maps API sets the Google Maps iframe to french language (based on my location).
I would like to be able to add items to the database that are in English, so I need to set the Google Maps widget language to English.
Hope this helps !
To use it, you simply have to set the GOOGLE_MAPS_DEFAULT_LANGUAGE in your settings.py file (list of languages: https://developers.google.com/maps/faq#languagesupport)
*I added the constant to settings.py, I forgot in my first PR, my bad.