test
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • palos Friend
    #199755

    How should I call a localised script?
    e.g.
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&language=ja"></script>

    The plugin seems like it forces language=en so all the names (district, etc) on the map written in english.
    I have not found the settings at backend and feel myself a little boy to find the script yet.:-[

    …maybe it is not forced to english just undefined and it is the default.

    Ninja Lead Moderator
    #542789

    Yes, you can do that in JA Google Map Plugin

    + Open plugins/system/jagooglemap/assets/elements/jamap.php file

    Line 76 and see script

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=true&key=' . $value;//v3

    + Open plugins/system/jagooglemap/jagooglemap.php file

    Line 199 and see script

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=' . $sensor . '&key=' . $api_key;//v3

    palos Friend
    #543005

    I am afraid that I coded it faulty. 🙁
    jamap.php
    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=true&key=&language=ja' . $value;//v3
    JHTML::script($map_js);

    jagooglemap.php
    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=&language=ja' . $sensor . '&key=' . $api_key;//v3
    $headtag[] = '<script src="' . $map_js . '" type="text/javascript" ></script>';

    ???

    Ninja Lead Moderator
    #543208

    This is right way

    In jamap.php

    Change

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=true&key=' . $value;//v3
    To

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=true&key=' . $value.'&language=en';//v3

    In jagooglemap.php
    Change

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=' . $sensor . '&key=' . $api_key;//v3
    To

    $map_js = 'https://maps.googleapis.com/maps/api/js?sensor=' . $sensor . '&key=' . $api_key.'&language=en';//v3

    Let me know if it helps

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  Ninja Lead 10 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum