This question has been answered by nightand. See the first response.
$docId = 12; // ID of default page
$modx->resource =& $modx->getObject('modResource', $docId);
$msg = print_r($_GET, true); $modx->log(modX::LOG_LEVEL_ERROR, $msg);
if (isset($_REQUEST['q']) && $_REQUEST['q'] != '') {
$alias = $_REQUEST['q'];
$resource_id = $modx->findResource($alias);
if (!is_numeric($resource_id)) $resource_id = $modx->findResource($alias . '/');
if (is_numeric($resource_id)) {
//got resource id so can now use BabelLinks snippet (slightly modified) to check for translations
}
}