Closed (fixed)
Project:
Simple Google Maps
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
11 Sep 2012 at 02:36 UTC
Updated:
11 Oct 2012 at 08:31 UTC
Hi This module is really useful, easy to use. I really like it.
BTW, I'm a Japanese so I want to use the Japanese version of Google maps. Maybe some others who are not English speaking/using people want the native version of it.
Please add the feature of changing the (default) languages.
THX in advance !
Comments
Comment #1
Shin-gdo_J commentedComment #2
jhodgdonThat sounds like a good idea. The map URLs for Google have an "hl=[language]" URL query parameter, so it would be easy to let an administrator enter a two-letter language code in the settings, and pass that to the map. The admin would need to figure out the right code, but that shouldn't be too hard (they could just look at the URLs that Google Maps provides to them in their language).
If someone wants to provide a patch, this could be added to the module soon. Otherwise, it may not be my highest priority right now for my Drupal volunteer work.
Comment #3
jibus commentedHi,
I ran into the same issue.
A patch isn't really required since there is a template.
Copy simple-gmap-output.tpl.php into your theme folder and replace the content with this:
It will take the language of the page where the map is displayed
Don't forget to clear cache
Comment #4
jhodgdonThat solution will definitely work with many languages, but I am not sure Google Maps supports all languages that could be in place on a Drupal site (the template is taking the language from Drupal's language code). Also, in theory you have the flexibility to define your own code for a language in the admin interface (such as using 'en-uk' for British English), so there is no guarantee that a code you chose would work for Google Maps.
So I think it would still be better to have a setting for the language... someone just needs to add it to the module.
Comment #5
jibus commentedOk, you mean, add an option to the formater wich allows to set the language for the map
Comment #6
jhodgdonExactly! Even better would be if it has two options:
a) Use the page's language (with a note that it would only work if Google Maps recognizes all the language codes in use on your site).
b) Use a particular language that you enter the code for.
Comment #7
jhodgdonI'm working on this module today, so I'll add this option.
Comment #8
jhodgdonDone! I'll be making a new release of this module shortly...
Comment #9
jibus commentedOH !
I was going to make a patch, but i see you just made it !
Thanks you very much ! Will test it !
Comment #10
jhodgdonYes, please do test, and let me know if you find any problems. :) I put this feature into the official 7.x-1.0 release of the module, which you can download on the module home page now.
Comment #11
jibus commentedWorks like a charm, thanks again !