New Landing How can we help? Atelier Change Google Map language on WPML site

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Atelier
  • #292791
    Integrity
    Member
    Post count: 32

    Hi,

    I have a multilanguage site with WPML (EN / DE).
    I’ve use a GMap on contact page, and I need to change the map language via the site language.

    Please help to solve this!

    #292954
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Can you provide us an url to that page?

    -Rui

    #292974
    Integrity
    Member
    Post count: 32
    This reply has been marked as private.
    #293260
    David Martin – Support
    Moderator
    Post count: 20834

    Hi,

    Please contact WPML support and report this issue: https://wpml.org/forums/forum/english-support/

    Thanks.

    #294075
    Integrity
    Member
    Post count: 32

    Hi,

    Here is the answer from WPML support staff, so the bug is in your theme:

    Hi, as I suspected, the map is being generated by a WordPress shortcode configured by the theme with the name of “spb_gmaps”. This shortcode accepts a couple of parameters but not the one that manages the language that Google needs to receive in order to translate the map. I suggest that you contact the theme author to adapt the them to your needs. You can direct the theme’s author to this thread for more technical details.

    ======================
    The technical details of the issue :

    The shortcode “spb_gmaps” does not receive the parameter “region” that Google uses to identify the correct language it is supposed to use. Either the shortcode does not have that parameter in its code or it was not used in the example given. Either way since this shortcode is used on the content of a post/page the way to pass this to Google would be for the function that processes the shortcode to use our constant ICL_LANGUAGE_CODE to add the region parameter to the resulting map code. One thing that has to be taken into account is the timing of the processing of this shortcode since WPML must be loaded first to allow it to set this constant.

    For reference : https://developers.google.com/maps/documentation/javascript/examples/map-language

    ======================

    #294132
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779
    This reply has been marked as private.
    #294319
    Integrity
    Member
    Post count: 32

    It’s doesn’t work for me: the map is in Hungarian lang on my desktop (Win10 HUN / Chrome HUN), on my phone (Android ENG / Chrome ENG) and on my laptop too (MacOS ENG / Chrome HUN).

    #294324
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    It will display the language that you use in each device.
    I will forward the suggestion to the development team to adapt the map language to the current WPML for a future development.

    -Rui

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register