# Problem setting language

**URL:** <https://forum.mautic.org/t/problem-setting-language/2096>\
**Category:** Product Support\
**Created:** [July 28, 2015, 9:35am UTC](https://forum.mautic.org/t/problem-setting-language/2096 "2015-07-28T09:35:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [July 28, 2015, 9:35am UTC](https://forum.mautic.org/t/problem-setting-language/2096/1 "2015-07-28T09:35:32Z")

</div>

Hello,  
  
  
  
I’ve installed Mautic in our own server, on a subdomain. When I try do change language (in profile or system defaults settings), I get the following error: “mautic.core.could.not.set.language”  
  
  
  
I have php 5.3.29 PHP version.  
  
  
  
Could you please help?  
  
  
  
Thank you

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [July 28, 2015, 9:35am UTC](https://forum.mautic.org/t/problem-setting-language/2096/2 "2015-07-28T09:35:32Z")

</div>

Hello,

I’ve installed Mautic in our own server, on a subdomain. When I try do change language (in profile or system defaults settings), I get the following error: “mautic.core.could.not.set.language”

I have php 5.3.29 PHP version.

Could you please help?

Thank you

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [July 28, 2015, 11:17am UTC](https://forum.mautic.org/t/problem-setting-language/2096/3 "2015-07-28T11:17:08Z")

</div>

During installation I got these:

```
•	You should have PCRE version 8.0 or later installed. Your environment has version 7.8 installed. It is suggested you update your PCRE installation.
•	The date.timezone setting is not set in your PHP configuration. Mautic has set the default timezone to 'UTC' but we suggest setting this in your PHP configuration.

```

Should I work on these? Any suggestion’s welcome.

---

<div class="post-metadata">

**Author:** ![chad.windnagle](https://avatars.discourse-cdn.com/v4/letter/c/7feea3/32.png) [@chad.windnagle](https://forum.mautic.org/u/chad.windnagle)\
**Post date:** [July 28, 2015, 1:51pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/4 "2015-07-28T13:51:31Z")

</div>

Hi:

If possible you should try to get a slightly newer version of PHP. 5.3 is supported by Mautic, but its not supported by PHP anymore! (readmore here: [https://www.mautic.org/community/index.php/586-php-version](https://www.mautic.org/community/index.php/586-php-version))

The php timezone error is easily solved with a quick edit to php.ini. Read more about that here: [http://www.inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file](http://www.inmotionhosting.com/support/website/php/setting-the-timezone-for-php-in-the-phpini-file)

The PCRE error is probably due to the old php version as well, so hopefully that will be fixed on a newer version of PHP. If not you’ll have to manually fix it ([http://stackoverflow.com/questions/12212079/pcre-librairies-version-is-too-old](http://stackoverflow.com/questions/12212079/pcre-librairies-version-is-too-old))

---

<div class="post-metadata">

**Author:** ![pietromantovani](https://avatars.discourse-cdn.com/v4/letter/p/f07891/32.png) [@pietromantovani](https://forum.mautic.org/u/pietromantovani)\
**Post date:** [July 29, 2015, 7:53am UTC](https://forum.mautic.org/t/problem-setting-language/2096/5 "2015-07-29T07:53:33Z")

</div>

Thank you Chad, I’ve upgraded PHP and I’ve solved with this: [https://www.mautic.org/community/index.php/72-installer-page-is-blank](https://www.mautic.org/community/index.php/72-installer-page-is-blank)

---

<div class="post-metadata">

**Author:** ![Martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Martin](https://forum.mautic.org/u/Martin)\
**Post date:** [January 20, 2016, 11:34am UTC](https://forum.mautic.org/t/problem-setting-language/2096/6 "2016-01-20T11:34:32Z")

</div>

Hi,  
I have problem set czech language on mautic 1.2.3. own server/ subdomain /PHP 5.6  
The same error like first post “mautic.core.could.not.set.language”

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 20, 2016, 12:09pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/7 "2016-01-20T12:09:18Z")

</div>

Check the PHP error log and the Mautic logs (app/logs dir) if there is some error message. Also check the permission and the owner of the /translations dir. Maybe Mautic doesn’t have the permission to write there.

---

<div class="post-metadata">

**Author:** ![Martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Martin](https://forum.mautic.org/u/Martin)\
**Post date:** [January 20, 2016, 12:38pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/8 "2016-01-20T12:38:12Z")

</div>

I set 777 for all folders and files = the same problem  
mautic error:  
[2016-01-17 00:07:41] mautic.WARNING: Command `doctrine:migrations:version` exited with status code 255 [] []  
[2016-01-17 00:07:41] mautic.ERROR: PDOException: SQLSTATE[HY000] [2002] Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) (uncaught exception) at /data/web/virtuals/53728/virtual/www/domains/mautic.solna-lampa.cz/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php line 40 while running console command `doctrine:migrations:version` [] []

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 20, 2016, 12:47pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/9 "2016-01-20T12:47:01Z")

</div>

That’s 3 days old error, that won’t be related. I’ve tested it on my Mautic instance. I’ve had the Czech already downloaded (mimochodem, ahoj 😉 ) so I removed the translations/cs directory, went to Mautic configuration, selected Czech again, saved. TBH, it did not download Czech for the first time, but it worked for the second time. The cache had to be cleared after I deleted the language dir I guess.

---

<div class="post-metadata">

**Author:** ![mt78](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@mt78](https://forum.mautic.org/u/mt78)\
**Post date:** [January 22, 2016, 7:07pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/10 "2016-01-22T19:07:56Z")

</div>

Hi there, where I can download Czech translation file please? I have the same issue with system language settings.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 23, 2016, 11:04am UTC](https://forum.mautic.org/t/problem-setting-language/2096/11 "2016-01-23T11:04:21Z")

</div>

Language files are downloaded and concatenated by a script somewhere at [mautic.org](http://mautic.org) from [https://www.transifex.com/mautic/mautic/](https://www.transifex.com/mautic/mautic/). I don’t know the URL address for the concatenated files. The simplest solution would be to fix the language file download while you select it in the configuration and save. There must be a server setting or a permission problem preventing it to work as it should.

---

<div class="post-metadata">

**Author:** ![Svet\_Zitrka](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@Svet\_Zitrka](https://forum.mautic.org/u/Svet_Zitrka)\
**Post date:** [January 24, 2016, 12:03pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/12 "2016-01-24T12:03:51Z")

</div>

I have the same problem. We tried for many, the PHP update after changing permissions of folders and files … Nothing helps.

PHP 5.6.17  
error: message: `"mautic.core.could.not.set.language"`  
error log:

```auto
"[01/24/2016 11:55:24] mautic.NOTICE: PHP Notice: SessionHandler :: gc (): ps_files_cleanup_dir: opendir (/ var / lib / php5) failed: Permission denied (13) - in file / var / www / svetzitrka.cz / subdomains / MTC / app / cache / prod / classes.php - at line 423 [] []"
```

Perhaps this is related to some approaches, but do not know where to look. You Metz also something to do with the absence of flags, see. screen?

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 25, 2016, 12:33pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/13 "2016-01-25T12:33:49Z")

</div>

Try to place:

```auto
echo "<pre>";var_dump($fetchLanguage['error']);die("</pre>");
```

to this line:

[https://github.com/mautic/mautic/blob/staging/app/bundles/CoreBundle/EventListener/ConfigSubscriber.php#L64](https://github.com/mautic/mautic/blob/staging/app/bundles/CoreBundle/EventListener/ConfigSubscriber.php#L64)

I can see the error reporting there isn’t finished. It should tell you what the error message is.

---

<div class="post-metadata">

**Author:** ![Svet\_Zitrka](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@Svet\_Zitrka](https://forum.mautic.org/u/Svet_Zitrka)\
**Post date:** [January 25, 2016, 1:13pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/14 "2016-01-25T13:13:03Z")

</div>

We carried out the treatment, but when applying CZ language in setting it freezes on the “Please wait …”  
Error message never does not list any. Neither PHP nor Mautic

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [January 25, 2016, 1:16pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/15 "2016-01-25T13:16:59Z")

</div>

Do you know how to work with Chrome Dev Tools? If so, open the request sent after save and see the message in its body.

---

<div class="post-metadata">

**Author:** ![smotalima](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@smotalima](https://forum.mautic.org/u/smotalima)\
**Post date:** [January 25, 2016, 1:54pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/16 "2016-01-25T13:54:18Z")

</div>

Even when updated to version 1.2.3 I continued with language configuration problem .So, I discovered a group on face only dedicated to Mautic Brazil.  
Here is the solution that Igor Almeida found, and it worked:

Summing up:

1. Download this file: [http://s000.tinyupload.com/?file\_id=08421274438124417591](http://s000.tinyupload.com/?file_id=08421274438124417591) (avaliable to Portuguese Brazil, only).

2. Unzip in the folder / translations

3. Use an FTP and delete the contents of the / app / cache  
note: not all files were deleted, in my case, but it worked.

4. Clean the Browse cache (browser), too.

5. Log in Mautic

6. Make the change of language in the settings

7. Change the language setting in the menu “Account”.

Note: is the directory where you installed the Mautic  
Put the whole pt\_BR folder inside the extracted folder … / translations

It is crucial to clear the cache.

---

<div class="post-metadata">

**Author:** ![myflower](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@myflower](https://forum.mautic.org/u/myflower)\
**Post date:** [February 5, 2016, 3:35pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/17 "2016-02-05T15:35:13Z")

</div>

I have resolved this problem.

Problem is caused in file LanguageHelper.php. This script is used to download language zip file. It loads URL and checks if server HTTP response is “200 OK”. If not, it fails. This is cause of (at least my) problem. Server isn’t responding with “200 OK”, but with “303” - a redirection. Script fails to recognize a redirection and automatically fails.

A patch for this problem is simple - just add [this code](http://pastebin.com/j8kEeQ61) and everything is going to work fine. Only thing I did was to follow redirection link, check again if it’s valid and pass new URL to the rest of script.

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [February 5, 2016, 3:41pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/18 "2016-02-05T15:41:25Z")

</div>

@myflower would you mind make it a pull request so it would be part of the Mautic’s core and the hacks won’t be necessary?

---

<div class="post-metadata">

**Author:** ![myflower](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@myflower](https://forum.mautic.org/u/myflower)\
**Post date:** [February 9, 2016, 12:50pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/19 "2016-02-09T12:50:28Z")

</div>

@escopecz I’m sorry, but what’s a pull request? 🙂

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [February 9, 2016, 1:31pm UTC](https://forum.mautic.org/t/problem-setting-language/2096/20 "2016-02-09T13:31:04Z")

</div>

@myflower good question. It’s a process which all Mautic developers to to suggest code changes to Mautic code base (or any other open source software on GitHub). Try to google more details about it. Here is how to set up the local development environment for it:

[https://github.com/mautic/mautic#how-to-test-a-pull-request](https://github.com/mautic/mautic#how-to-test-a-pull-request)

[Next page](https://forum.mautic.org/t/problem-setting-language/2096.md?page=2)
