Sunday, 14 September 2014

WPML Translations and Booki

Booki for WordPress is a booking plugin with several features to accommodate a variety of scheduling scenarios involving reservations and appointments.

It does not take much to realize that a large portion of WordPress downloads are from a non English speaking, international audience. So it is very important that a plugin follows some standard practices to allow translations.

All strings in Booki use the base translation function in WordPress. While this is the default in Booki, it wasn't enough for several reasons.

Not all users are developers and hence not well versed with *.mo/*.po files or poedit which requires a slight learning curve. This adds so much friction and is error prone as there is many a slip between the cup and the lip!

Secondly, there are several dynamic, user edited phrases in Booki that cannot be translated using this method. An alternate solution was required and many of our users were already using WPML.

Preparing Booki for translations

Once you have created a project, you will notice in the projects tab under the "Booking Control Label Settings" several strings you can modify for the particular project.

These dynamic strings along with the project name and project description, form builder field labels, optional labels, cascading list labels and items, and strings defined in the "String Resources" page will all appear as translatable strings in WPML string translations add-on.

The following mock-ups display a typical booking with minimal options a hair dresser might end up creating. Note how all labels and textual content is translatable.



Bookings can also include booking details, which contain form fields you create using the "Form Builder" in Booki. Note below a basic form created using Booki's "Form Builder". All field labels are translatable.



Booki meets WPML

To get started, you will need WPML and add-on Plugins i.e. the core WPML Multilingual CMS which is always required and the String translations add-on.

 Guide for installing & activating WPML is available on the WPML getting started guide.

A demo of Booki running under WPML
Default english : http://theme-testing.wpml.org/plugin-booki/
Spanish : http://theme-testing.wpml.org/plugin-booki/es/bed-and-breakfast/

After having installed WPML, if the projects in Booki were created before installing WPML, the dynamic strings aren't registered.

The first thing to do is load the page holding your booking form in the front-end. This allows any dynamic strings not registered to be registered automatically.

Next go in WPML "Theme and plugins localization" page and scroll down to the "Strings in the plugins" section. You will find all your plugins listed here.


Check "Booki" and click "Scan the selected plugins for strings". WPML will look for all static translatable strings and add them to WPML for translation.

You are now ready for translations.

Load the "String Translations" page. You will have this once you install the String Translations add-on for WPML. Select either the dynamic list of strings it found in Booki during the scan or the static ones.

The differences are denoted by "Name" field. Dynamic strings have a name field while the static ones don't.


There, that was easy,wasn't it? Happy coding!

3 comments:

  1. I want to buy your Booki program but I need some changes like:

    1. Make independent school ( sections or interface )
    2. The amount of student per classes ( 10 max - 4 min )
    3. The admin can change manual configurations
    4. The amount of school per ( each interface ) & classroom availables
    5. Student can change their timetable in the booking system

    11. Customer can change booking, but not cancel only by admin
    12. Customer can change his booking ( hours per weeks within a month only ). This is for groups.

    15. Admin can create up to the minute bookings
    16. Admin can include/exclude specific days or time when creating a booking

    ReplyDelete
  2. Filament
    In a single WordPress plugin, Filament contains a group of useful features including Flare, a social share button plugin that makes it easy for others to share your blogpost on Twitter, Facebook, Buffer, and more—even spots like Hacker News and Reddit. Other Filament apps include: MailChimp subscribe form, Google Analytics tracking, all-in-one profiles, code management, and share highlighter.

    ReplyDelete