# Add to Structure in specific language

**URL:** <https://forum.getkirby.com/t/add-to-structure-in-specific-language/14883>\
**Category:** Questions\
**Tags:** v3\
**Created:** [July 10, 2019, 10:45am UTC](https://forum.getkirby.com/t/add-to-structure-in-specific-language/14883 "2019-07-10T10:45:48Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Oli1](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/oli1/32/14419_2.png) [@Oli1](https://forum.getkirby.com/u/Oli1)\
**Post date:** [July 10, 2019, 2:56pm UTC](https://forum.getkirby.com/t/add-to-structure-in-specific-language/14883/5 "2019-07-10T14:56:34Z")

</div>

No sorry, also not working! Everytime I do this request at a english page, all field datas are deleted … Do I understood this wrong? I wanted to put in all data that are collected only to the german file. Full code:

```
$kirby = kirby();
$kirby->impersonate('kirby');

function addToStructure($page, $field, $data = array()){
  $fieldData = page($page)->$field()->yaml();
  $fieldData[] = $data;
  $fieldData = yaml::encode($fieldData);
  try {
    page($page)->update(array($field => $fieldData),'de');
  } catch(Exception $e) {
    return $e->getMessage();
  }
}
 
addToStructure(page('conversions'), 'nachrichtenverlauf',[
  'nachrichtenverlauf_art' => 'Preisanfrage',
  'nachrichtenverlauf_fahrzeug' => $preisliste,
  'nachrichtenverlauf_datum' => $datum,
  'nachrichtenverlauf_uhrzeit' => $uhrzeit,
  'nachrichtenverlauf_email' => $email,
  'nachrichtenverlauf_sprache' => $sprache
]);

$kirby->impersonate();
```

---

_[View the full topic](https://forum.getkirby.com/t/add-to-structure-in-specific-language/14883)._
