In this Article
We are proud to announce that BasePress is now compatible with WPML making it the perfect solution for a multilingual knowledge base.
This is a small explanation of how to use BasePress in conjunction with WPML to make your knowlege base multilingual. It does not cover all aspect of how to use WPML. Please consider visiting WPML website to consult their documentation for further details.
To build your multilingual knowledge base you need to install the following plugins:
- BasePress (version 1.5.0 or above)
- WPML Multilingual CMS
- WPML String Translation add-on
- WPML Translation Management add-on
After you have installed and activated all plugins and add-ons you are ready to start translating your content.
When using WPML to translate your knowledge base we suggest to always create your content in the main language and then proceed with the translations. If for example you have English and French as active languages for your website and you have set English as the main language, you should always create content in English first and then translate it to French. This will simplify the process in particular for big size knowledge bases.
All content in the knowledge base is hierarchical – products are top level categories, sections are descendant of products (or other sections) and finally the articles are descendant of sections. It is very important to preserve this hierarchy during translation.
Always start by translating your products, then translate the top sections followed by their sub-sections and finally translate the articles. Following this simple order will guaranty that the content hierarchy is always preserved.
To translate products and sections go to WPML->Taxonomy Translation and select ‘Knowledge Base Categories’ from the menu.
A list of all products and sections will appear. In the column with the language flags click the plus icon to translate the item. Fill in the form that will open with the translated content and save. BasePress will keep synchronized all data like the product image, the section image and icon, product and section order for all languages.
Once the products and sections are translated you can find the translation in the Knowledge Base screens under Knowledge Base->Products and Knowledge Base->Sections for their relative languages. You can make any further changes directly there without the need to go back to WPML screen.
After you have translated the products and sections you can start translating your articles. Go to Knowledge Base->All Posts and click on the plus icon for the language you want to make the translation.
The standard WordPress editor will open. You can then proceed creating the stranlation. Remember to select the product and section for the translation and save. BasePress will synchronize all extra data like the icon and the article order across all languages.
Products are top level categories for the knowledge base, they will never loose hierarchy so you should not worry about them. Just make sure they are the first to be translated.
Sections and sub sections are child categories of products. If you translate a section but its parent product has not been translated yet, that translated section will remain without parent. The same will happen if you translate a sub-section before its parent section. Any section or sub-section without parent will be be treated as a product by BasePress.
When this happens you will notice that when you go to Knowledge Base->Products, the section you have translated will appear in the products list.
To fix a section that has lost hierarchy start by translating its parent product. Once translated go to Settings->BasePress->General and enable ‘Restore Category Screen’.
You will now find a new menu item under knowledge base called ‘Knowledge Base Categories’. This is the standard WordPress screen to manage categories. Select the section that has lost the hierarchy from the category list and use the parent list to select the correct product for this section and save. You can now disable the Category screen from the options.
When you are translating an article you won’t be able to select the product or section if they are not translated yet. You can save the article as a draft and proceed translating the product and section the article belongs to. Once finished you can go back to the article, select the product and section and publish the article.
Some of the text that appear in the front side of the knowledge base are present under Settings->BasePress. To translate them go to WPML->String Translation and select ‘admin_texts_basepress_settings’ from ‘Select strings within domain’ menu. You will get a list of all BasePress settings. Click on ‘translations’ on the right side of each item, add your translation and save.
To translate the widgets go to WPML->String Translation and select ‘Widgets’ from ‘Select strings within domain’ menu. You will get a list of all active widgets including the the ones for the knowledge base. Click on ‘translations’ on the right side of each item, add your translation and save.