Jump to content


For Those Who Want To Use Their Language In Google Maps Shortcode .

Submitted by Simon_P on 01 November 2012 - 12:45 PM

#42


  • Issue Details
  • Severity: Fixed
  • Category: PageLines Framework
  • Version: 2.3.6
Assigned To: Simon_P Fixed   Add Issue 

Simon_P

Issue Timeline

  • Simon_P updated issue severity to Fixed

    26 November 2012 - 06:17 PM

  • Simon_P updated issue version to 2.3.6

    26 November 2012 - 06:17 PM

  • Simon_P added issue #42

    01 November 2012 - 12:45 PM

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  

Find

 

function googleMaps( $atts, $content = null ) {


delete  from

 

function googleMaps( $atts, $content = null ) {

to
 

return &#39;<iframe width="&#39;.$width.&#39;" height="&#39;.$height.&#39;" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="&#39;.$src.&#39;&amp;output=embed"></iframe>&#39;;

}

   (Line 204 )


And Paste this in!

 

function googleMaps( $atts, $content = null ) {

     extract( shortcode_atts( array(

         "width"     => &#39;480&#39;,

         "height"     => &#39;480&#39;,

         "locale"     => &#39;en&#39;,

         "address" => &#39;&#39;

     ), $atts ) );

     $src = "http://maps.google.com/maps?f=q&source=s_q&hl=".$locale."&q=".$address;

     return &#39;<iframe width="&#39;.$width.&#39;" height="&#39;.$height.&#39;" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="&#39;.$src.&#39;&amp;output=embed"></iframe>&#39;;

}


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 .

Comments


TracDown © 2013 Michael Burton
Click to return to top of page in style!