protected function extractTranslatedAttributes(Polyglot &$model)
{
$attributes = $model->getAttributes();
$polyglot = $model->getPolyglotAttributes();
$translated = array();
foreach ($attributes as $key => $value) {
if (in_array($key, $polyglot)) {
$translated[$key] = $value;
unset($model[$key]);
}
}
return $translated;
}