The following findings are current as of WPML 3.4.0 and SLP 4.5.07.
The short version: When using WPML to switch languages you will want to make sure your alternate language files are up-to-date and installed in the Store Locator Plus languages folder. You can use Loco Translate to sync and generate updated .po/.mo files. You may want to check out the WordPress Translate for Store Locator Plus site and download the latest .po and .mo files from there.
The WPML String Translations set manually via the user in the admin panel is NOT used when for the plugin when a gettext string is used. Developer’s Note: WPML String Translations appear to only be used when employing the wpml_translate_string or wpml_translate_single_string filters.
Store Locator Plus sets most of the default text in the Text Manager class using gettext functions. When a page implements the [slplus] shortcode the string presented in various locations, the default Find Button label, for example, is NOT loaded in the alternate language despite using the WPML String Translation plugin.
Manually setting the translation via the WPML String Translation admin interface does not seem to to be used by default despite WPML Multilingual CMS, WPML String Translation, and WPML Translation Management being installed and active.
Using Loco Translate To Help WPML
By using Loco Translate to sync and save an updated .po/.mo language file to the SLP languages directory, the WPML language switcher will now pick up the proper translation. The process I used to get the Italian translation for “Find Locations” to show up when I select the Italian version of the page:
- Install and Active Loco Translate
- Go To Manage Translations in Loco Translate
- Select the existing it_IT translation file next to Store Locator Plus.
- Click sync to load in the latest gettext() calls that need translation.
- Add the missing “Find Locations” text in Italian.
- Save the file.
Now my Italian version of the English “Locations” page shows the proper text on the Find Locations button when I switch from the English page to the Italian page.
This file resides in the root directory of the plugin.
The file is only loaded on admin pages.
The admin-texts node is only used for changing the text on the admin options, serial or singular, only.
The user’s language on the admin page is based on the language selected in their PROFILE, not via the language selector on the admin bar.