# Language files issues

**URL:** <https://discourse.cataclysmdda.org/t/language-files-issues/14520>\
**Category:** The Garage\
**Created:** [November 21, 2017, 7:55pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520 "2017-11-21T19:55:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 21, 2017, 7:55pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/1 "2017-11-21T19:55:07Z")

</div>

I want to make a British translation of the game (because reasons). The problem is, I can’t do it. I’ve tried editing the cataclysm-dda.pot file, making a new en\_GB.po file among some other stuff. I’ve requested the translation on Transifex. The question is, is there any way I can manually add a language to the game?

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 22, 2017, 1:07am UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/2 "2017-11-22T01:07:42Z")

</div>

Sounds like you found it, but just in case here’s the main documentation:

> <https://github.com/CleverRaven/Cataclysm-DDA/blob/master/doc/TRANSLATING.md>

The project uses gettext, here are the gettext instructions for creating a new language file:  
[https://www.gnu.org/software/gettext/manual/gettext.html#Creating](https://www.gnu.org/software/gettext/manual/gettext.html#Creating)

---

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 22, 2017, 6:15pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/3 "2017-11-22T18:15:22Z")

</div>

Do I need to recompile the game in order to see the new language?

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 22, 2017, 6:25pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/4 "2017-11-22T18:25:25Z")

</div>

I can’t recall for sure if the config for languages used is present in a json file or hard-coded somewhere. If it’s pulled from config updating that should be sufficient, if it’s hardcoded it will require a compile.

Edit: looks like it’s hard-coded here: [https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/options.cpp#L932](https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/options.cpp#L932)

But if you can arrange for it to recognize your system language as en\_GB it should pick it up. I have to warn you that bit is fragile and system-dependent, which is why we have the options there in the first place.

---

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 23, 2017, 3:17pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/5 "2017-11-23T15:17:42Z")

</div>

Will adding ‘en\_GB (English (UK)’ entry to /src/options.cpp, making the .po file, compiling the .mo files and then the game prove enough?

---

<div class="post-metadata">

**Author:** ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)\
**Post date:** [November 23, 2017, 5:54pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/6 "2017-11-23T17:54:42Z")

</div>

I think that’s it, but I’m notc100% sure. All you need to do to certify it is change one word in the interface in your .po file.

---

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 25, 2017, 5:37pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/7 "2017-11-25T17:37:03Z")

</div>

BTW, is there any tool for .po file editing for Ubuntu? As in, I want to edit the translated text only, but I don’t want to manually replace every instance of the stuff that I want to translate.

---

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 27, 2017, 7:08pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/8 "2017-11-27T19:08:21Z")

</div>

This stubborn piece of… whatever still doesn’t want to translate! I’ve updated the .pot, compiled .mo, what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![lol2121](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/lol2121/32/2118_2.png) [@lol2121](https://discourse.cataclysmdda.org/u/lol2121)\
**Post date:** [November 28, 2017, 5:54pm UTC](https://discourse.cataclysmdda.org/t/language-files-issues/14520/9 "2017-11-28T17:54:08Z")

</div>

You know what? I’m just going to leave it as-is and finally get to the darn game!
