# Setting the default locale for a page that is created programmatically

**URL:** <https://forum.xwiki.org/t/setting-the-default-locale-for-a-page-that-is-created-programmatically/12671>\
**Category:** Help / Discuss\
**Tags:** livetable\
**Created:** [June 13, 2023, 2:32pm UTC](https://forum.xwiki.org/t/setting-the-default-locale-for-a-page-that-is-created-programmatically/12671 "2023-06-13T14:32:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jan-Paul-Kleijn](https://forum.xwiki.org/user_avatar/forum.xwiki.org/jan-paul-kleijn/32/7060_2.png) [@Jan-Paul-Kleijn](https://forum.xwiki.org/u/Jan-Paul-Kleijn)\
**Post date:** [June 13, 2023, 2:32pm UTC](https://forum.xwiki.org/t/setting-the-default-locale-for-a-page-that-is-created-programmatically/12671/1 "2023-06-13T14:32:57Z")

</div>

Hi everyone,  
I was wondering how to correctly set the default locale for a page that is created in velocity. I have looked for info on this topic on this forum but I am still not sure about some things.

1. Is it correct to (for example) use `$doc.setDefaultLocale("en")`?
2. Is it still needed to have programming rights for this?
