WordPress.org

Ready to get started?Download WordPress

Forums

Pronamic Google Maps
[resolved] Map in my language (9 posts)

  1. ronshe
    Member
    Posted 10 months ago #

    Hi,

    The map is shown in English only, although WordPress knows current language (WPLANG).
    Is there a way to change it to my language?

    Thanks,
    Ronny

    http://wordpress.org/extend/plugins/pronamic-google-maps/

  2. Leon Rowland
    Member
    Posted 10 months ago #

    Hello ronshe

    What language are you set at. Pronamic Google Maps currently doesn't have all languages for it. We are always looking for more people to contribute with their translations.

    You can find the plugin on github where you can translate the plugin if you are up for it.

    https://github.com/pronamic/wp-pronamic-google-maps

  3. ronshe
    Member
    Posted 10 months ago #

    Sorry for being unclear.
    Your plugin has a translation to my language.
    The problem I am pointing at is the language of the map itself.

    Look at Moscow map in English
    Same map in Russian

    Map of Tel-Aviv in English
    Same in Hebrew

  4. Remco Tolsma
    Member
    Plugin Author

    Posted 10 months ago #

    Within the Pronamic Google Maps plugin we don't use the WPLANG constant to set the Google Maps language.

    https://developers.google.com/maps/documentation/javascript/basics?hl=nl#Localization

    In most cases, this is preferable; you usually do not wish to override the user's preferred language setting. However, if you wish to change the Maps API to ignore the browser's language setting and force it to display information in a particular language, you can add an optional language parameter to the <script> tag when including the Maps API JavaScript code, specifying the language to use.

    The map should therefor display in the language of your browser.

  5. ronshe
    Member
    Posted 10 months ago #

    Remco,

    You are correct, but you suggest that I will change the plugin. In this case if my client will update the plugin, than the language settings will be overridden by the new code.

    Your plugin does support languages, why couldn't the maps in it support languages too?

    Thanks,
    Ronny

  6. Remco Tolsma
    Member
    Plugin Author

    Posted 10 months ago #

    Google says that it is preferable to not override the user's preferred language:

    In most cases, this is preferable; you usually do not wish to override the user's preferred language setting.

  7. ronshe
    Member
    Posted 10 months ago #

    I was traveling Greece and went into an English website to find out how to get somewhere. The computer at the internet-cafe was Greek, so the maps where in Greek too. It was frustrating.

    I believe that the website builder should have the choice to decide.

  8. Remco Tolsma
    Member
    Plugin Author

    Posted 10 months ago #

    In the development version we added some filters so you can adjust the language programmatically.

    https://github.com/pronamic/wp-pronamic-google-maps/commit/00098ede97a479496a27f60251b29dbe54f1463e

    In the following example you can see how to set the language:

    https://github.com/pronamic/wp-pronamic-google-maps/blob/develop/examples/map-set-language.php

  9. ronshe
    Member
    Posted 10 months ago #

    Thanks a lot Remco,

    It does not work yet.
    I suppose that I have to wait for a newer version of the plugin (I have 2.2.4).

    Ronny

Reply

You must log in to post.

About this Plugin

About this Topic