Add language support
-
Free/Light Version 2.0.5 of Huge It Google Map plugin
—————————————————–
On a multilingual WP site, you may want to display the Google maps interface language according to the current site’s language.
I’m talking about the following strings: Map, Satellite, Map Data, Terms of use, Report a map error, hover “Click to see this area in Google Maps” etc.
This is easily achieved by adding one line and modifying another line in file googlemaps/googlemap.php in function mapss_front_end_scripts()after line 345:
add this new line: $current_language = get_bloginfo(‘language’);
change line: wp_enqueue_script(“gmap”, ‘https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places’);
to:
wp_enqueue_script(“gmap”, ‘https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=places&language=’.$current_language);Hope this helps!
The topic ‘Add language support’ is closed to new replies.