You have to use resource groups for this and a plugin, that sets the resource group on context base during saving the resource. The existing resources could be set by a one time running snippet.
The code for the plugin is quite simple, it has to run in onDocFormSave:
<?php
/**
* SetResourceGroup
*
* @package setresourcegroup
*/
/** @var $modx modX */
/** @var $scriptProperties array */
/* only operate on new resources */
if ($mode != modSystemEvent::MODE_NEW) {
$modx->log(xPDO::LOG_LEVEL_INFO, 'Old Resource ' . $resource->get('id'));
return;
} else {
$modx->log(xPDO::LOG_LEVEL_INFO, 'New Resource ' . $resource->get('id'));
switch($resource->get('context_key')) {
case 'en':
$group = 'Translator (en)';
if (!$resource->joinGroup($group)) {
$modx->log(xPDO::LOG_LEVEL_ERROR, 'Can\'t add the resource ' . $resource->get('id') . 'to the Resource Group "'. $group . '"');
}
break;
}
$group = 'Administrator';
if (!$resource->joinGroup($group)) {
$modx->log(xPDO::LOG_LEVEL_ERROR, 'Can\'t add the resource ' . $resource->get('id') . 'to the Resource Group "'. $group . '"');
}
}
return;