# Rebuild says "no such locale exists"

**URL:** <https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824>\
**Category:** Support\
**Created:** [16.Январь.2017 09:36:47 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824 "2017-01-16T09:36:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glamdring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glamdring/32/121266_2.png) [@Glamdring](https://meta.discourse.org/u/Glamdring)\
**Post date:** [16.Январь.2017 09:36:47 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824/1 "2017-01-16T09:36:47Z")

</div>

In case one wants to use a language that is not in the official list, but is, let’s say, at 80% at Transifex (which is my case), there is no good way to use it.

Downloading and renaming the files from transifex is tedious, but I guess it’s the same for every new language. The other issue is you have to manually copy the files to the discourse docker instance (it won’t make sense to make a PR, because it is not fully translated yet).

Then you have to switch language, rebuild assets, and it works (which isn’t documented in one place). However, there are two major issues:

- you can’t rebuild when a non-standard language is set as default. The rebuild command complains that “no such locale” exists. You have switch back to an official language and only then rebuild
- after the rebuild, the custom language is gone, so you have to again manually copy the files, rebuild assets, switch configuration.

The latter wouldn’t be such a problem, if you didn’t have to rebuild for, say, smtp server change. Now on every such configuration change you have to go through the whole process.

I think this should be somehow simplified - a few ideas: don’t require rebuild for simple configuration change; have a “custom language” folder in /var/discourse in the host machine which doesn’t have to be in git, from which the language files are picked and deployed on every rebuild; don’t fail the database dump on rebuild if “no such locale” exists

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [16.Январь.2017 10:02:23 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824/2 "2017-01-16T10:02:23Z")

</div>

I think there is a severe error in the translation. Rebuilding works fine in other languages.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [16.Январь.2017 10:10:29 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824/3 "2017-01-16T10:10:29Z")

</div>

Perhaps the “error” is that this language wasn’t properly submitted to the project?

> [@How to add a new language](https://meta.discourse.org/t/how-to-add-a-new-language/14970):
>
> Contribute translations The first step is to do some translating in [our Crowdin workspace](https://translate.discourse.org/). Create an account and start translating in one or more languages. See [Contributing translations to Discourse](https://meta.discourse.org/t/contribute-a-translation-to-discourse/14882) for more information about that. Add language to Discoursewarning These instructions are currently out of date! You have two options when you think that the translation is ready to be included in Discourse: Post in this topic and ask for your language to be included in Discourse. There m…

---

<div class="post-metadata">

**Author:** ![Glamdring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/glamdring/32/121266_2.png) [@Glamdring](https://meta.discourse.org/u/Glamdring)\
**Post date:** [16.Январь.2017 19:51:33 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824/4 "2017-01-16T19:51:33Z")

</div>

The thing is - I shouldn’t add the translations to the project, as they are not 100% ready (around 80%). Yet I want to use them (they cover almost all of the user-facing part). So I just copied the files. They were recognized by discourse and I successfully switched to the newly copied language. However rebuilding fails, I think in a database backup phase.

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [24.Июль.2022 23:17:43 UTC](https://meta.discourse.org/t/rebuild-says-no-such-locale-exists/55824/7 "2022-07-24T23:17:43Z")

</div>


