Problem:
We are trying to set up a user role for translators on our site that gives them the permissions to edit and translate the content, but not to access plugins and theme options.
Solution:
Just add this code to the functions.php file:
add_filter('wpml_user_can_translate', function ($user_can_translate, $user){
if (in_array('editor', (array) $user->roles, true) && current_user_can('translate')) {
return true;
}
return $user_can_translate;
}, 10, 2);