# createChild with non-default language and translate: false

**URL:** <https://forum.getkirby.com/t/createchild-with-non-default-language-and-translate-false/22642>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 21, 2021, 7:45pm UTC](https://forum.getkirby.com/t/createchild-with-non-default-language-and-translate-false/22642 "2021-06-21T19:45:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzur](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@mzur](https://forum.getkirby.com/u/mzur)\
**Post date:** [June 21, 2021, 7:45pm UTC](https://forum.getkirby.com/t/createchild-with-non-default-language-and-translate-false/22642/1 "2021-06-21T19:45:13Z")

</div>

I believe I found an issue with the behavior of `$page->createChild()` (or any way to programmatically create a page) and `translate: false` fields in a multi-language setup.

Assume the available languages are `de` (default) and `en`. Also, there is an `order.yml` page blueprint like this:

```yml
title: Order
fields:
  order_id:
    label: ID
    type: text
    translate: false

```

Now when the current language is `en` (non-default) and a new order page should be created with:

```php
$orders->createChild([
  'slug' => 'myorder',
  'template' => 'order',
  'content' => [
    'title' => 'my order',
    'order_id' => '123456',
  ],
]);

```

a new `order.en.txt` is created which only includes the `Title`. The `Order_id` field is lost, since no `order.de.txt` is created which would normally include all the fields with `translate: false`. My expected behavior here would be that both `order.en.txt` and `order.de.txt` should be created.

I found that you can set `translations` in the arguments to `createChild` but I didn’t understand how that works (is it documented?). Maybe that would be a way to make this work in any language. Currently I’m working around this issue by manually setting the current language to the default before `createChild()` and then resetting the language afterwards.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 21, 2021, 8:24pm UTC](https://forum.getkirby.com/t/createchild-with-non-default-language-and-translate-false/22642/2 "2021-06-21T20:24:46Z")

</div>

I think I’ve seen this issue before, but could not find a bug report on GitHub, nor can I find the topic here.
