WPML (WordPress Multi Language) is a plugin which gives your website the ability to have the same content in different languages. With WPML you don’t have to create a website for each language. You can have one website (domain) and have each page, post portfolio, product etc. show up in its the different language.
Once the plugin is enabled the flags show in the front of the website below the navigation and will give your visitors the ability to view a page in the selected (active) language (if the page has been created for that language). All they have to do is click on one of the listed flag (language) icons.
- If a page or (custom) post has not been translated / created in that language it won’t show of course.
- Flags will only show for each of the activated languages.
How to Use the WordPress Multi-Language Plugin on Default Content?
Here are the Steps we would use to Translate a Page or Post :
- Create a page and finish the complete content with featured images and all other images, attachments etc. Once done publish the post.
- Once finished that page make sure you have the post / page opened (in the admin back-end) and on the right side just below the admin name in the wpml option box check the languages and create a duplicate of that page for each of the other languages.
- While still in that ‘original’ page change the language by the use of the language selector button (menu option) in the admin bar. The page will be presented in the other language.
- You will see the page in the other language but since you duplicated the content it will look exactly the same as in the original content of the primary default language your created the page in, in the first place.
- You now have two options…. :
- You leave it like it is which means that if somebody switches the language in the front of your website he will see the same page but still not translated.Note : If you do not create duplicates for a page or post that page or post will not show in the other language and throw the user back to the root of the domain in the other language if he clicks on the flags while viewing a page in the hope to see and read the translated version of that page. Note 2: WPML has an option called ‘Blog Post to Display’. You can set that option to ‘All posts’ or to ‘Only Translated Posts’. Please only use the ‘Only Translated Posts’ setting. The Theme does not support the ‘All Posts’ setting. You can read more about that here on the forum : Show me that tutorial
- You disconnect the duplicate from the original language by hitting the ‘ Translate Independent’ button in the WPML box just below the admin name. Making them independently translated pages means you can now write and adjust the content in the other language without affecting the content in the ‘master document’ or the original document.Note:The documents are still connected to each other by the WPML plugin but the content is now separated.Note 2:Not making them ‘Translate Independent’ documents means that if you change the content in one of the other languages you are actually modifying the content in the primary default language. So be careful here and watch your steps.
- Don’t forget to publish the translated version!
- Repeat steps 2, 3, 4, 5 and 6 for each language.
WordPress Multi-Language Plugin and Categories.
The theme comes with custom post types like Portfolio, Rooms, Teams which like the Posts of WordPress itself can be grouped into categories. In order to have Posts grouped and listed by category you will have to :
- Create a Post
- Create a Category
- Attach the Category to the Post
- Publish the Post
Calling a category will list all posts attached to that category in the requested sort order. Categories can be added to the menu system as a menu item. So once clicked upon a list of posts attached to that category will show.
By translating a category and posts the same can be accomplished for each of the translated category listing pages. The translated category will then list all posts attached to it within the other language.
Note : It is wise to create the categories first and their translations for each language. You will notice that if a post is attached to a category and that post is translated you don’t have to worry about the translation of the category anymore as wpml will already know it and assign the correct one to the post.
WPML Plugin String Translation Addon
WPML CMS Plugin comes with an add-on called String Translation. Theme supports string translations for fields we use throughout the theme. Even within the template builder. Once such string is detected by the WPML plugin its translation can be done in the String Translation Add-on. So instead of creating duplicates of some fields and content, if supported, these can be translated a different way. You can read more on the string translation add-on at WPML.org.
Note : Not all strings will be visible in the string translation Add-on.
Only the strings (fields) we connected and have taken care of within the theme code, will be visible on the list of the string translation add-on. For example :
- Copyright text
- Social Media
- Breadcrumb text
- And much more…
WPML and Different Widgets Per Language
For widgets that are not supported by (string) translation, duplication WPML advice to use plugins like Widget Logic and Dynamic Widgets to make widgets appear in a certain sidebar areas based on a language ID. Please consult the WPML documentation on this on how to use and accomplish that. Show me →