Posted on

SLP versions: Power add-on, Experience add-on version 4.6.1 updates to import functions


Store Locator Plus 4.6.1 Highlights

• Allow add-ons to load JS on a per-admin-tab basis. Reduces browser overhead and memory footprint on admin pages.

• Simplify and improve the new option manager. More consistent option handling, more security option management, better performance.

•  Checkbox on/off validation for all add ons – fixes instant checkbox saving on admin panel for some add on options

• All language files are now pulled from the MySLP website.  • Missing translations? See MySLP and add your translation updates there.

Change Log for SLP Power Add-on

Posted on

Store Locator Plus 3.11.13

Store Locator Plus Language Banner

Store Locator Plus 3.11.13 was released today.   It is the simplest release I’ve done in the past year since taking over the plugin development.    This release adds the Dutch translation files to the base product.   The language code is nl_NL.

Thank you Jan de Baat for your contribution!

Jan will get a premium add-on pack for the effort.   Jan used the Codestyling Localization plugin to create the NL language files and send along the .po and .mo files to me via email.

That’s it.  Back to the custom code updates and 4.0 work.

Posted on

Translating Plugins To Your Language

Some of my plugins use settings in the main application settings page to set labels on the user interface.    However, MOST of the admin interface instructions and labels and some of the labels on the user interface can only be changed by using the WordPress language translation system.

To create a translation file you will need to download the latest .pot file for the plugin that you wish to translate, then create a .po file from it.    The easiest way to start is simply copy the .pot file to a new <locale>.po file, such as da_DK.po.

All of my plugins have a languages subdirectory that contains the .POT and some .PO files that have already been translated.

POT files

After the strings are marked in the source files, a gettext utility called xgettext is used to extract the original strings and to build a template translation POT file. Here is an example POT file entry:

#: wp-admin/admin-header.php:49
msgid "Sign Out"
msgstr ""

PO files

Every translator takes the WordPress POT file and translates the msgstr sections in their own language. The result is a PO file with in the same format as a POT, but with translations and some specific headers.

Naming The PO and MO Files

The .po and .mo files should follow the standard naming convention which is:

<text_domain>-<language code>_<country code>.<po|mo>

For Store Locator Plus, the text domain is csa-slplus.   You can see this in the top of the store-locator-le.php file as part of the comment, however not all plugins will have that helpful hint.    You should look for the load_plugin_textdomain function call within the plugin to find the true identity of text_domain.     This is on line 241 in the storelocatorplus-actions_class.php file (for Store Locator Plus version 3.11) which reads load_plugin_textdomain(‘csa-slplus’,false, SLPLUS_PLUGINDIR.’languages/’);

The language code is one of the pre-defined language codes as defined by PHP.   This is typically a lowercase pair of letters such as “en” for English or “es” for Spanish.

The country code is one of the pre-defined 2-letter country codes.  For example, US for USA, GB for United Kingdom, for Canada.

The combination of language plus country code allows for nuances in the language that my vary by specific location.

Thus, for an American translation the file name for Store Locator Plus would be csa-slplus-en_US.po and   For The United Kingdom it would be csa-slplus-en_GB.po and

Using Codestyling Localization Plugin

I recommend using the Codestyling Localization plugin to make it far easier to create the related PO files.   This plugin reads the plugin directory and provides a web based interface for creating translations.

Send Your Translation

If you create a .po translation file, please send it to us at info_at_charlestonsw_dot_com or post it in the forums.  Tell me which plugin or add-on pack and which version of the plugin you created it for, and I will include it in the next public release.

Also, if you send a complete translation file,  I’ll grant access to the premium add-on packs for your account!

Related Resources