WPML string translation – "Find Locations" response to Jonathan

Home Forums Store Locator Plus WPML string translation – "Find Locations" response to Jonathan

This topic contains 8 replies, has 3 voices, and was last updated by  Lance Cleveland 2 years, 4 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #22725

    Jason
    Participant

    Hello,

    This is a follow-up to Jonathan’s post WPML : Somes elements not translate which appears to have been closed before determining a proper solution.

    I have the most recent version of SLP and I too noticed this issue when using WPML. There are quite a few strings that are not translatable such as “Find Locations”. It looks like this particular string is hard-coded into the class.ui.php file on line 336 rather than going through your getWPMLText() function. Perhaps some of these strings not going through getWPMLText() is an oversight.

    Easily fixed in an update 😉

    Jason

    #22727

    Lance Cleveland
    Keymaster

    Yup, you are right.     I’ve added the getWPMLText() call to the find button label.

     

    You will need to use Enhanced Search to get the interface that allows the button text to be set through the base product.    However that is not mandatory for the WPML support which can supplant that functionality.

     

    If you see other calls that need getWPMLText() please let us know.

    #22733

    Jason
    Participant

    Hi Lance,

    Thank you for your quick response and the code update! 🙂

    There’s an option under Theme and Plugin Localisation in WPML to scan the entire plugin for strings and manually make changes but that’s far more tedious than using your getWPMLText function!

    Regards,
    Jason

    #22735

    Jonathan
    Participant

    Sorry but what is the “getWPMLText() ” ??

    I want just translate somes string like file attached

     

    • This reply was modified 2 years, 5 months ago by  Jonathan.
    Attachments:
    You must be logged in to view attached files.
    #22738

    Jonathan
    Participant

    And this

    Attachments:
    You must be logged in to view attached files.
    #22745

    Jason
    Participant

    Hi Jonathan,

    I cannot answer for the developer but now that they have been notified that there are some strings in the code that are not passed to the WPML string translator, I think you may see this corrected in the next update.

    In the meantime, it’s not the most effective solution but you can force WPML to scan the plugin for strings and manually translate them. Keep in mind though that doing so will add every single string in the plugin, which is a LOT.

    You can find the instructions for how to scan the plugin here http://wpml.org/documentation/getting-started-guide/theme-localization/

    Good luck
    Jason

    #22779

    Jonathan
    Participant

    Thks

    But is not a good solution for us.
    <div id=”select_document” style=”display: none;”>Saisissez du texte, l’adresse d’un site Web ou importez un document à traduire.</div>
    <div id=”file_div” class=”file” style=”display: none;”>
    <div id=”select_text” style=”display: none;”>Annuler</div>
    <input id=”file” style=”display: none;” name=”file” size=”40″ type=”file” /></div>
    <div id=”src-translit” class=”translit” dir=”ltr” style=”display: none;”></div>
    <div id=”spelling-correction” class=”gt-spell-correct-message” style=”display: none;”>Langue source : Français</div>
    <span id=”result_box” lang=”en”><span class=”hps”>I chose</span> <span class=”hps”>your</span> <span class=”hps”>plugin</span> <span class=”hps”>as it was</span> <span class=”hps”>indicated</span> “<span class=”hps”>WPML</span> COMPATIBLE” and I paid for us lot of money for that.</span>

     

    I used “codeStyling Localization” PLUGIN, is not good for my siteweb to use another plugin like WPML trasnlation string.

    I hope a update very soon.

    Sorry for my bad english

    #23092

    Lance Cleveland
    Keymaster

    If you have a site with only a single language needed you should create a language translation (.mo/.po file set) and put it in the ./languages directory of the SLP plugin.   Contribute any language files I don’t have already and I will send a premium add-on starting with the Pro Pack.

    /supportdocumentationstore-locator-plusgetting-startedlanguages/

    You only need WPML if your site has an option for users to switch languages.    SLP supports WPML and I update the base plugin and add-on packs any time I find a setting that is not calling WPML functions.    The upcoming release of SLP will have some additional translations.

    I currently am sending any database-stored text, typically set/retrieved with a WordPress get_option() call, through the WPML data-driven language system.  All other text, such as standard “gettext” calls via __(‘text’) are handled via the built-in WPML translation system.       If there is a better methodology for WPML I’d like to hear about it, but from what I read this seems like the prescribed best practice for WPML compatibility.

    If anyone finds text that cannot be translated with WPML please let me know.

     

    #23093

    Lance Cleveland
    Keymaster

    BTW, anyone with a Premier Subscription can get the prerelease of SLP 4.1.30 which has some of the WPML fixes.  It is available on the Premier user’s download page.

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

You must be logged in to reply to this topic.