For Those Who Want To Use Their Language In Google Maps Shortcode .
Submitted by Simon_P on 01 November 2012 - 12:45 PM
#42
Simon_P
Issue Timeline
Hi, don't know if I post it here is correct.
I need the googlemap shortcode to use . But it just shows the English Address.
I need it in Traditional Chinese.
So, if you want to use your Language rather English.
Use your code editor to edit the pagelines/includes/class.shortcodes.php
Findfunction googleMaps( $atts, $content = null ) {
delete fromfunction googleMaps( $atts, $content = null ) {toreturn '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&output=embed"></iframe>'; }(Line 204 )
And Paste this in!function googleMaps( $atts, $content = null ) { extract( shortcode_atts( array( "width" => '480', "height" => '480', "locale" => 'en', "address" => '' ), $atts ) ); $src = "http://maps.google.com/maps?f=q&source=s_q&hl=".$locale."&q=".$address; return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&output=embed"></iframe>'; }
Save it. Done.
Now you can add an attribute locale="your country" in your shortcode .
For example :
[googlemap width="100%" height="300" locale="zh_TW" address="台南市永康區小東路689號"]
You can find your country Here !
Remember, it is core file. So , before you edit, please backup.
And everytime you upgrade your PL , you have to do it again.
Source: For Those Who Want To Use Their Language In Google Maps Shortcode .


