June 24, 2014 at 8:02 PM #22725
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 😉
JasonJune 24, 2014 at 9:00 PM #22727
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.June 24, 2014 at 11:37 PM #22733
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!
JasonJune 25, 2014 at 5:15 AM #22735June 25, 2014 at 5:55 AM #22738June 25, 2014 at 1:22 PM #22745
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/
JasonJune 27, 2014 at 3:09 AM #22779
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 englishJuly 11, 2014 at 9:36 AM #23092
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.
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.July 11, 2014 at 9:37 AM #23093
You must be logged in to reply to this topic.