String translation missing ?

New home Forums Pro Add-on Troubleshooting String translation missing ?

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #72602
    costino80
    Participant

    Hi,

    I have WP Google Maps pro and I’m very happy with this great and powerful extension.
    I translated my website with Polylang in three languages (french, dutch, english) and while some strings are translated (pagination, etc), other are not…

    How can I translate theses strings ?

    – “Filter by”
    – The columns headers of the markers list (Adres, Description, Title,…). They stay in french no matter what I try…
    -Marker’s info bubble (x km distance from.., itinerary,etc…)

    Since the .po files exist, shouldn’t they be automatically translated ?

    Thanks in advance for you help !

    #72733
    costino80
    Participant

    Up.

    Any idea on how to translate those strings ?

    Thanks

    #72738
    Steven
    Moderator

    Hi there,

    Thank you so much for getting in touch, we really appreciate your time.

    Some strings cannot be translated automatically via the PO if the strings do not exist so these might need to be added.
    – https://www.wpgmaps.com/documentation/translating-the-plugin/

    With that said, fields are static and need to be adjusted with some custom script which I am happy to help with.

    If open to this, please send me a link to the page where your map is situated?

    I look forward to hearing back from you.

    Kindest Regards,
    Steven De Beer

    #72846
    costino80
    Participant
    This reply has been marked as private.
    #72850
    Steven
    Moderator

    Hi @costino80,

    Thank you so much for getting back to me.

    Could I kindly ask you to navigate to -> Maps -> Settings Advanced Settings -> please copy the script found in the below link and paste this in the custom JS field:
    – https://gist.github.com/StevenDeBeer/56a0796ccdc52babdb52cbba2e0aba30

    Kindly adjust where it says New Text Here to the correct translations in order(1,2,3) which is left to right of the table.

    This should detect the language of the page or browser and adjust the translations accordingly.

    Let me know if this helps?

    Kindest Regards,
    Steven De Beer

    #72851
    costino80
    Participant

    Hello,

    Thanks.

    It’s strange because I don’t have the “custom JS field” on the advanced settings page but I have two custom css fields.

    I assumed it was a backend translation issue and pasted the code in the second text field, without changing anything. (except userLang to fr-BE and nl-BE from my page html)

    I looked on the frontend and my columns weren’t translated in “New text”.

    Am I missing something ?

    Thanks.

    Attachments:
    You must be logged in to view attached files.
    #72862
    Steven
    Moderator

    Hi again,

    Thank you so much for getting back to me.

    That is correct, it does seem to be a translation issue so the second field should still contain the functionality for custom JavaScript.

    Might I kindly ask if you would be open to creating a temporary admin account so that I might try a few adjustments?

    Kindest regards,
    Steven De Beer

    #72873
    costino80
    Participant
    This reply has been marked as private.
    #72916
    costino80
    Participant

    Hello,

    Did you have de chance to have a look at this strange behavior ?

    Thanks,

    #72926
    Steven
    Moderator

    Hi again,

    Thank you so much for getting back to me and my sincerest apologies for the delay.

    I have made a few adjustments and this does seem to be getting adjusted at my end.

    Could I kindly ask you to take a look at your end?

    Kindest Regards,
    Steven De beer

    #72927
    costino80
    Participant

    Great thank you !
    It works like a charm !

    I assume “markerlistingupdated.wpgmza” is a custom jquery event 🙂

    For those interested to change the column headers of the markers’listing, paste this code below in Maps -> Settings => Advanced Settings -> custom JS field, and change the language code “fr-BE, nl-BE..” accordingly.

    Query(document.body).on(“markerlistingupdated.wpgmza”, function(event){
    var userLang = navigator.language || navigator.userLanguage;
    var htmlLang = document.getElementsByTagName(“html”)[0].getAttribute(“lang”);

    if(userLang == ‘nl-BE’ || htmlLang == ‘nl-BE’) {
    // Dutch Translation
    jQuery(‘.wpgmza_marker_holder th:nth-child(1)’).text(‘New Text Here’);
    jQuery(‘.wpgmza_marker_holder th:nth-child(2)’).text(‘New Text Here’);
    jQuery(‘.wpgmza_marker_holder th:nth-child(3)’).text(‘New Text Here’);
    } else if(userLang == ‘fr-BE’ || htmlLang == ‘fr-BE’) {
    // French Translation
    jQuery(‘.wpgmza_marker_holder th:nth-child(1)’).text(‘New Text Here’);
    jQuery(‘.wpgmza_marker_holder th:nth-child(2)’).text(‘New Text Here’);
    jQuery(‘.wpgmza_marker_holder th:nth-child(3)’).text(‘New Text Here’);
    }

    });

    Again thank you !

    #72928
    Steven
    Moderator

    I am glad this has helped.

    That is correct, this should ensure that each time the marker listing is updated fur to filtering for example, the title change along with it.

    Do let me know if there is anything more I can help with or if you have any more questions. 🙂

    If you ever have two minutes spare, please consider reviewing the plugin on Twitter @WPGMaps or if you don’t use Twitter on https://wordpress.org/support/plugin/wp-google-maps/reviews/#new-post it would mean the world to me! (If possible, could I ask you to mention both your name and mine in the review for administrative purposes, this would be a tremendous help!)

    Kindest Regards,
    Steven De Beer

    #72932
    costino80
    Participant

    Thank you.

    I don’t use Twitter but I reviewed the plugin and the great support on WordPress.org

    Keep up the good work !

    Thank you.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.