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.
If you are using WPML for the first time, you need to manually download and install it.
- 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.
- Go back to the Plugins page and enable the newly uploaded/added plugins.
Getting Started with WPML
- After installing the WPML plugin, follow the initial setup wizard steps to set up the essential configuration settings by navigating to WP-admin >> WPML.
- 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.
- Move to the Settings page and make sure you select the Multilingual Content Setup tab.
- 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.
We recommend using the Advance translation editor because it is easier to use and saves a lot more time.
- Scroll down to the Slug translations section, check the Translate custom post and taxonomy based slugs (via WPML String Translation) box and click Save.
- Scroll down to the bottom of the same tab to the Post Types Translation and Taxonomies Translation sections.
- The basic plugin setup is now complete!
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.
- 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)
- In the next step, you need to select the pages you want to translate, by check-marking on the box beside them.
- After the pages or posts are selected, select the translation options you want them to translate in.
- Finally, click on “Add selected content to translation basket”.
- Go to WPML >> Translation Queue.
- Here, you get the list of all the pages, posts, and events, and you can click on any page you want to translate.
- You would be redirected to the Advance translation editor page.
- 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.
- However, you can also translate individually by clicking on “click to edit translation”.
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.
- When you are done, you can save it and hence the page gets translated.
Now go to translation basket and click on “Send all items for translation”.
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:
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.
<wpml-config> <custom-types> <custom-type display-as-translated="1" translate="1">event_organizer</custom-type> <custom-type display-as-translated="1" translate="1">event_venue</custom-type> </custom-types> </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.
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.
How to Translate Strings with WPML
- 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.
- Click on this tab- WPML has detected changeS or new MO files >> WP Event Manager, and scan for the Translations files.
- After the translations are completed, you need to go to String Translation( Wp-admin >> WPMl >> String translation)
- Here in the domain section mention the name of the plugin (Wp-event manager) and search for the terms you are looking to translate.
- 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.
- The String is now translated on the frontend.
Navigate to Theme and Plugin Localization.
In order to translate Taxonomies, one can go through the doc: from here.