Independent language options are available for the calculator displayed on your web site (the visitor portion of the plugin).

CabGrid is already available in English, German, Spanish, French, Dutch, Italian, Greek & Portuguese. When WordPress is set to any of these languages (under WordPress Admin > Settings > General > Site Language), both the admin and visitor parts of the plugin will automatically appear in the selected language. However, visitors may not always speak the native language of the website, so there is an option that allows visitors to change the language of the CabGrid interface independently of the site’s default settings.

Try the flag icons…

  •  
  • Discount/Promo Code
  • Extras

    Select additional items to add to your booking

    • Water

      Water

      Chilled mineral water

      -+

      $1.491.49


No price found for this journey

Show Language Options

When set to YES (Show Language Options), a set of flag icons will be visible on the calculator interface. Clicking any flag icon will switch the language of the plugin. These icons can be turned on or off in the OPTIONS tab of the Cab Grid Pro admin.

The flags displayed are based on the translations available in the plugin’s ‘languages’ folder. This means as more translations are added, these languages will automatically become available to visitors. It also means that users can provide their own translations and have them included by uploading them to this folder.

One important thing to note is that any custom text (such as messages and custom form field labels) entered in the Cab Grid Pro admin section will not be automatically translated. This is because this text is arbitrarily entered by the admin…. The built-in translations are not computer generated – they are professional translations made by native speakers. It is possible for administrators to add their own translations for custom labels, though.

Styling

The flag icons can be styled using the following CSS selectors:

.cabGridPro .cabGridProFlagCont {/*Flag icon container*/}
.cabGridPro .cabGridProFlagCont span {/*Each flag icon*/}
.cabGridPro .cabGridProFlagCont span:hover {/*Mouse over flag icon*/}

So you could selectively show the flag icons by enclosing the calculator in your own custom HTML element:
HTML (enter in the text/source editor on your WordPress page/post)
<div class="hide-flags">[cabGridPro]</div>
CSS (enter in ‘Styling (CSS)‘ box in OPTIONS tab of Cab Grid Pro page in WordPress admin)
.hide-flags .cabGridPro .cabGridProFlagCont {display:none;}

Hiding some languages and showing others

If only certain languages are supported, some languages can be disabled.

One way to disable languages (and flag icons) is simply to delete the relevant .mo file from the languages folder located at wp-content > plugins > cab-grid-pro > languages. This will permanently remove the selected translations. However, if there is an update for the plugin, new languages may be added and the deleted ones restored.

An alternative approach is to use CSS to hide certain flag icons from the price calculator interface. Each flag icon is given a CSS class representing the language. For example, Greece’s flag icon has a class, “flag-icon-gr“. Thus, adding the following CSS code to the ‘Styling (CSS)’ box will hide language flags:
.cabGridPro .cabGridProFlagCont .flag-icon-gr {display:none !important; /*No Greek*/}
.cabGridPro .cabGridProFlagCont .flag-icon-br {display:none !important; /*No Brazillian*/}
.cabGridPro .cabGridProFlagCont .flag-icon-pt {display:none !important; /*No Portugues*/}

Multi-lingual Sites

If a website is available globally in more than one language via a 3rd-party plugin such as Polylang or WPML it is advisable to set ‘Show Language Options:’ to NO (under the OPTIONS tab on the Cab Grid Pro WordPress admin page).

Not only will this disable the flag icons on the calculator interface, it will allow CabGrid to pick up the language as defined by the multi-lingual plugin. If CabGrid has a matching translation, it will be shown in the desired language or the language can be added to CabGrid’s translations directly.

Multi-lingual Notifications

CabGrid Pro sends various notifications to both the custom and administrator. CabGrid will attempt to send notifications to the customer in their chosen language whilst the admin will receive notifications in the site language set in the WordPress admin. The admin notification will indicate which language the customer chose.

Tags: , , , , ,

x
  •  
  • Discount/Promo Code
  • Extras

    Select additional items to add to your booking

    • Water

      Water

      Chilled mineral water

      -+

      $1.491.49


No price found for this journey