- Home
- Blogs
- Guy Schneerson's blog
- Setting translators on a multilingual drupal 7 site
Setting translators on a multilingual drupal 7 site
Drupal 7 has great support for multilingual site and has various approaches to content translation and localization.
In this quick recipe post I will cover the setting up of a "Translator" role for the following translation approaches
- Interface translation: The translation of strings used throughout the site
- Entity translation: The translation of Nodes and other entities using entity/field translation
I will try and cover other translation & localization approaches at a later stage
Setting up the Translator role
-
Easy head over to people->permissions->roles (admin/people/permissions/roles)
-
Add a role: translator
Interface translation
In order to allow our translator to access the Translate interface Administration » Configuration » Regional and language » Translate interface (admin/config/regional/translate/translate) we need to provide him the following permissions
- Head over to Administration » People » Permissions (admin/people/permissions)
- Add the "Translate interface texts" to our translator role
- Add the "Translate user-defined strings" to our translator role
Note that Drupal gives the following warning to both of the above permissions:
Warning: Give to trusted roles only; this permission has security implications.
So make sure you only provide the "translation" role to trusted users, ideally people from within the organisation and not external translators.
Entity translation
In order to allow users to translate nodes (we will not be handling any other entity types)
- Head over to Administration » People » Permissions (admin/people/permissions)
- From the "Entity Translation" section add the "Translate any entity" to our translator role
- From the "Node" section add the "{node type}: Edit any content" for each of the node types to be translated
Other permissions
If your site has no custom theme suporting backend functionality you should also give your translator the "View the administration theme" role.
You should also consider giving your translator the "Use the site in maintenance mode" role, so he can work while the site is offline.
Providing an Administrative interface
Make sure the user has a convenient menu entry to the translate interface admin/config/regional/translate/translate
As far as entity translation goes our translator can use standard navigation throughout the site and look for content that needs translation, however we find that setting up a nice views based content translation section will provide a much more structured approach.
To create our translation view
The following is a rough description of the process you will need to use common sense when adding fields and exposing filters to your users.
- Head over to Administration » Structure (admin/structure/views)
- Add a new view of type Content
- Set the access to role translator
- Add a relation to "Content: Entity translation: translations" as Translations
- Add some fields including (Translations) Entity translation: Translate link
Create a few displays
- Missing translations: You can create a display to show all missing translations by adding "Entity translation: Translation exist" to your filter criteria and set to FALSE.
- Translated nodes: Those are nodes with no translations (new contant in most use cases) by adding "Entity translation: Translation status" to your filter criteria and set to FALSE.
- Translations needing update: Show translations that have been marked using "This translation needs to be updated" by adding "Entity translation: Needs update" to your filter criteria and set to TRUE.
And don't forget to expose some filters to your translators.
Contact Details
Blue-Bag Ltd
- info [at] blue-bag.com
- Telephone: 0843 2894522
- Blue-Bag HQ:
The Garage, Manor Farm
Chilcompton, Radstock
Somerset, BA3 4HP, United Kingdom - Telephone: (+44) 01761 411542
- Blue-Bag Brighton:
Unit 35 Level 6 North, New England House
New England Street, Brighton
BN1 4GH United Kingdom - Telephone: (+44) 07944 938204
- VAT GB 748125034
- UK Company Reg: 3932829