The Toolset Access plugin lets you create editors for specific languages and enables them to review and publish translations of specific content types.
Normally, if you want to set a user as an editor for a language, then this user needs to have at least WordPress Editor-level permissions. Toolset Access provides the functionality to set access rules for specific user roles or individual users on specific content types and languages.
This workflow requires you to have the WPML Translation Management feature, which is included with the Multilingual CMS and Multilingual Agency account types.
Let’s assume that we have created a Book custom post type, which can be translated, and we have enabled English as the default language and German as the secondary language.
Our final goal is a system where one person can create books and send translation jobs, another can submit translations for review, and a third user is responsible for editing and publishing these translations. The permissions for each user are illustrated in the following table:
|admin||Administrator||Can manage books, can manage translations for books in all languages, can manage users & translators|
|german_editor||Subscriber||Can edit and publish translations for books only in the German language|
|german_translator||Subscriber||Can submit translations for books in draft status only in the German language|
There are three main steps in order to achieve our goal. Through this guide, we will:
- Create the required users and roles
- Set up the translator in WPML
- Use Toolset Access to configure permissions for the editor
The first step is to create the users of the site. The admin will have an Administrator role and will have the permission to create and edit any books or translations. For the editor and the translator, it is recommended to assign the Subscriber role to them, as this ensures that they will only have the permissions that we will assign to them in the following sections.
Let’s assume that we have already enabled the English and German languages for our site, with English being the site’s default language.
To start, it is important to set that translations will be submitted as drafts in the WPML settings. To do this, navigate to the WPML → Settings page and scroll down to the Translated documents options section. There, check Draft in the Document status setting.
The next step is to set the german_translator as the translator from English to German. This can be done from the Translators tab in WPML → Translation Management.
Now, german_translator is allowed to take up German to English translation jobs and submit them in draft status. You can read more about translation management features in the official documentation.
At this point, you can use the Toolset Access functionality to create a group of permissions for the german_editor user. These permissions will apply to the Book custom post type only for the selected languages, which in our case is German.
To activate these permissions, go to the Toolset → Access Control page. In the Post Types tab find the Books post type. Expand the Books custom post type and enable the Managed by Access option.
You can now move on to creating a new group of permissions. In the WPML Groups tab, click on the button to create permission for a specific language.
After selecting the appropriate custom post type and language, you can start setting up permissions for a specific user.
In order to set a user as a language editor, click the icon at the bottom of the column for each type of permission. Then, type the username in the dialog’s text field. Access will auto-complete and let you select the user.
As the example above shows, the german_editor can edit, delete, and publish any translation in the German language.
Now that you have the desired functionality, let’s see the system in action. For the purpose of this example, let’s consider a scenario where the admin creates a new book, sends a job to the german_translator to submit the German text, and tasks the german_editor with reviewing this translation and publishing it.
The following table illustrates the steps for this scenario and describes the process to complete it:
|Administrator creates and publishes a new book.|
|Administrator creates a new translation job for the book and sends it to the translator. |
You can find more information about WPML Translation Management in the official documentation.
|Translator receives a new entry in books list and only has the permission to add a German translation for this book.|
|Translator inserts the German text and submits the translation.|
|Editor uses the language switcher in order to check and edit the translations.|
|Editor checks the list of translated books and only has the permission to edit and publish German translations.|
|Administrator checks the list of books and has the permission to edit all entries in all languages.|