Multilingual Website Using WPML

Multilingual Website Using WPML

WordPress Multilingual Plugin is one of the most powerful tools used for translation and it is highly compatible with the WP Event Manager plugin. It makes it easy to transform any ordinary WordPress website into a multilingual site. You can choose your preferred language from more than 40 languages for your website.

A few things need to be considered to ensure that these plugins work smoothly. For example, both the plugins must be installed in your system before gearing up in this process.

WPML Installation

If you are using WPML for the first time, you need to manually download and install it.

  1. Then log into your site and visit the Plugins page and click on the Add New option. On the Add Plugins page click Upload Plugin, select the ZIP files that you have downloaded and click Install Now.

    Alternatively, if you cannot upload plugins directly to WordPress:

    I. Unzip each file. A directory will be created.

    II. Upload the unzipped directories to your site’s ../wp-content/plugins directory.

  2. Go back to the Plugins page and enable the newly uploaded/added plugins.

Getting Started with WPML

  1. After installing the WPML plugin, follow the initial setup wizard steps to set up the essential configuration settings by navigating to WP-admin >> WPML.
    Getting Started With Wpml

  2. After setting up the plugin in the WPML area of the WordPress dashboard (WP-admin >> WPML), you will see a new tab under the WPML section head.
  3. Move to the Settings page and make sure you select the Multilingual Content Setup tab.
  4. Scroll down to the How to translate posts and pages section. You can select any one of the two options available, The classic editor, or the WPML’s Advanced Translation Editor.How To Translate Posts And Pages With Wpml

    We recommend using the Advance translation editor because it is easier to use and saves a lot more time.

  5. Scroll down to the Slug translations section, check the Translate custom post and taxonomy based slugs (via WPML String Translation) box and click Save.
    Wpml String Translation
  6. Scroll down to the bottom of the same tab to the Post Types Translation and Taxonomies Translation sections.
    Taxonomies Translation 1
    Taxonomies Translation 2
  7. The basic plugin setup is now complete!
  8. You are ready to start managing translations for your event.

How to translate pages, posts, and custom posts

Translating pages, posts and custom posts can be done both manually and with Translation management.

Translating with Translation Management

WPML will guide you through a simple setup wizard if you are using WPML ‘s Translation Management.

  1. After the setup, you are directed to a Translation management dashboard, where you need to select the type of translation(page/post/block/template,etc)
  2. Translate Pages, Posts, And Custom Posts

  3. In the next step, you need to select the pages you want to translate, by check-marking on the box beside them.Translate Pages, Posts, And Custom Posts 1
  4. After the pages or posts are selected, select the translation options you want them to translate in.
  5. Finally, click on “Add selected content to translation basket”.
  6. Translate Pages, Posts, And Custom Posts 2

    Now go to translation basket and click on “Send all items for translation”.

    Translate Pages, Posts, And Custom Posts 3

    Your pages are now ready to be translated.

    In case, you want to manually translate the pages, you can read here: https://wpml.org/documentation/getting-started-guide/

    In order to translate the pages via Advance translation editor, please Proceed with the following steps:

  7. Go to WPML >> Translation Queue.Translation Queue
  8. Here, you get the list of all the pages, posts, and events, and you can click on any page you want to translate.List Of All The Pages, Posts, And Events
  9. You would be redirected to the Advance translation editor page.
  10. If you have an automatic translation tool, you can click on the Translate automatically option. The whole page gets translated automatically with the help of the machine translation.Redirected Advance Translation Editor Page
  11. However, you can also translate individually by clicking on “click to edit translation”.
    Automatic Translation Tool
  12. Translate Individually 2

  13. The whole Page would be broken down into the sentence format, which can be also edited and translated according to your needs.

    One of the biggest advantages of using the Advance Translation Editor is that you can focus on Test and all the Html markers are removed.

  14. When you are done, you can save it and hence the page gets translated.
    Page Gets Translated

How to translate Custom Post Type(Organizer/Venue)

You can translate the custom post types both manually and automatically through the XML file. The language configuration file includes information so that each and every user doesn’t need to manually enter it on the admin page. The file is named wpml-config.xml and it’s placed in the root folder of the plugin or theme.

  1. <wpml-config>
  2. <custom-types>
  3. <custom-type display-as-translated="1" translate="1">event_organizer</custom-type>
  4. <custom-type display-as-translated="1" translate="1">event_venue</custom-type>
  5. </custom-types>
  6. </wpml-config>

You can read more on the language configuration file here: https://wpml.org/documentation/support/language-configuration-files/#custom-types

To be able to translate custom post types Manually, you need to set them as “translatable” in WPML.

  • Go to the WP-admin >> WPML >> Settings and scroll to the Post Types Translation section.
  • Here, Select Organizer and venue and click on Translatable.
  • .
    Translate Custom Post Type

Hence now you can either directly translate using the translate manager as they would now appear on the translation dashboard or Go to WP-admin >> event manager >> Organizer/venue and translate manually.
Translate Custom Post Type 1
Translate Custom Post Type 2

How to Translate Strings with WPML

    Navigate to Theme and Plugin Localization.

    Translate Strings With Wpml

  1. Since the Wp-Event Manager already provides .mo files, you would see a notification tab that would state, WPML has detected changeS or new MO files.
    Wpml Has Detected Changed Or New Mo Files
  2. Click on this tab- WPML has detected changeS or new MO files >> WP Event Manager, and scan for the Translations files.
    Scan For The Translations Files
  3. After the translations are completed, you need to go to String Translation( Wp-admin >> WPMl >> String translation)
    Go To String Translation
  4. Here in the domain section mention the name of the plugin (Wp-event manager) and search for the terms you are looking to translate.
    Go To String Translation Wpml
  5. Let’s take an example, We search for “Choose a Category and hence all the source strings now appear on the screen, which you can now Translate. For this click on the plus sign, for the language, you want to translate, enter the translation, and press enter.
    String Translation Wpml 1
    String Translation Wpml 2
  6. The String is now translated on the frontend.
    String Is Now Translated On The Frontend

In order to translate Taxonomies, one can go through the doc: from here.

    • Related Articles

    • Translating WP Event Manager

      WP Event Manager is capable of being translated into any language using the standard WordPress localization methods and is not necessarily to be used in the English Language. All language files are located within the wp-event-manager/languages/ ...
    • How To Remove Duplicate Event Type Meta Box While Using Gutenberg Editor

      In order to remove a duplicate event type meta box while using Gutenberg editor, you need to follow the below mentioned steps: Open your child theme. Enter the following code in your functions.php file. add_filter( 'rest_prepare_taxonomy', ...
    • Enabling Full Template Support

      WP Event manager uses custom post types, therefore, post archives can be enabled and fully themed. You can create template files for archives of events using WordPress Template Hierarchy. Note: For the single event listings, WP Event Manager by ...
    • How To Add My Registrations on My Account Page

      The My Registration page allows your registered users to view all the events they have registered for in a centralized location. The page can be created with the shortcode [my_registrations] You can also create the My Registration page in the My ...
    • Event List with Elementor plugin

      If you are new to WordPress and searching for ways to set up your events page then Elementor can be the best choice for you. It is one of those free plugins that help you customize your website page very easily. Elementor works seamlessly with almost ...