• Resolved aleksandrdbby

    (@aleksandrdbby)


    Hello! How can I change the map language for this page https://test.dymresources.com/contacts/ For a number of reasons, the default language in WordPress was selected as Russian, and the content is English. I can’t just change to English, as translations in WPML will fail. Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DylanAuty

    (@dylanauty)

    Hi @aleksandrdbby,

    Thank you for getting in touch, we do appreciate your time.

    We don’t have a way of setting this manually, as it always inherits from the page/site language. With that said, we do have a filter which allows you to replace/change the value with a snippet of code.

    Are you comfortable with adding a small snippet of code to your theme functions file? If so, you should be able to add the following snippet to change this:

    add_filter('wpgmza_google_maps_api_params', 'wpgmzaLocaleReplace', 10, 1);
    function wpgmzaLocaleReplace($params){
        if(!empty($params) && !empty($params['language'])){
            $params['language'] = 'en';
        }
    
        return $params;
    }

    This uses WordPress filters (PHP) to set the language manually.

    If you are not comfortable adding this yourself to the functions.php file of your theme, please do get in touch with us on our website and we’d gladly assist you with adding this.

    Thread Starter aleksandrdbby

    (@aleksandrdbby)

    It works! Thank you!)

    Plugin Author DylanAuty

    (@dylanauty)

    Great to hear, @aleksandrdbby – Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I change the map language’ is closed to new replies.