36

Wordpress should always allow me to change the language, anytime. However, sometimes I get stuck in these kind of situations, where I only get to choose "English (United States)".

(Settings > General Settings > Site Language)

What I expect:

a

What I get:

a

Why is that? How can I fix this?

7
  • So... nobody knows?
    – Fabián
    Feb 22, 2016 at 19:21
  • I have the same problem. Did you manage to fix it?
    – Sushi
    Apr 29, 2016 at 20:07
  • 2
    This might be a permissions issue—does Wordpress have the correct permissions?
    – Stuart
    Oct 24, 2016 at 14:59
  • I am also facing the same problem. When I am trying to change the language it is only the showing one language i.e English other languages are not showing in the drop down Please suggest or tell me if anyone has the solution for the same. So I can fix the issue.
    – Lalit
    Aug 4, 2017 at 7:15
  • 1
    Late response but I had the same issue (during an installation) and what was the reason here... (my bad) not the full permission given to that specific virtal domain. So my solution was as mentioned by @Stuart already, setting correct permissions. (e.g. for Centos 7 chown -R apache:apache /path/to/virtual/domain and SELinux giving the correct settings) That allowed me after installation to select another language.
    – Charles
    Feb 12, 2019 at 8:25

9 Answers 9

26

Maybe WordPress doesn't have permissions to save the new language files. I had the same problem, and I solved it by adding the following to wp-config.php

define('FS_METHOD', 'direct');

You might also want to check that your wp-content/-directory is writable for the web server user.

6
  • That should be accepted answer, the other ones are workarounds. Jul 27, 2018 at 12:51
  • Dawid: FS_METHOD has nothing to do with the language per se, but it's nice that it solved your problems. The other answers are according to what the WP team writes here (so not really a workaround, just manual install): codex.wordpress.org/… Oct 7, 2018 at 12:09
  • 1
    Change wp-content permission to 777 solved the issue!
    – John Jang
    Dec 31, 2018 at 12:52
  • 1
    @John_J re:777: To test if permissions are the problem ok, but don't use 777 in a production environment, recommended permissions for folders 755 - see WordPress Codex 'Changing File Permissions' 'The dangers of 777' Nov 27, 2019 at 9:18
  • 1
    It was a permission problem for me (Ubuntu). Fix: ~$ chown -R www-data /path/to/wordpress Jul 8, 2022 at 2:16
12

I have no experience with WP before. I tried to install WP 4.7 and have same problem. Only English was in dropdown list. I thought WP downloads all translate files automaticall but unfortunately it didn't.

To get languages in dropdown list (Settings > General Settings > Site Language) you need install translate files to wp-content/languages directory.

To download language file select version of WP here https://translate.wordpress.org/projects/wp than select language. You will get a page where you can download language file.

For example for wp4.7 Ukraine I have got this page

translate.wordpress.org/projects/wp/4.7.x/uk/default

At the end of the page find Export link. Select 'all current' as 'Machine Object Messages Catalog (.mo)' and click export

Then put downloaded file in wp-content/languages directory. Open or refresh Settings > General Settings page. You should see new language in dropdown list.

It is important to download .mo file exactly. I spent a lot of time trying to install .po file. Also if you linux user and have only .po file you can convert it by command

msgfmt -o uk_UA.mo uk_UA.po

To install translate files for plugins and themes you should to do same things with some difference.

More details you can find here https://codex.wordpress.org/Installing_WordPress_in_Your_Language

1
  • This works for me perfectly. thank you. Dec 15, 2020 at 11:31
7

Just ran into the same issue. In my case, the reason was simple. When you install an English-only version of WordPress, there is no languages subdirectory under the wp-content directory. Create it manually, and you will receive all available language list at your WP dashboard.

1. Create the target directory

By default, the "content" directory is <wordpress folder>/wp-content. However depending on your installation it might not be that one.

To check, run wp eval "echo WP_CONTENT_DIR;"

Once you have identified that directory, create a languages directory in it.

2. Install languages

If Wordpress doesn't have permissions to install languages for you into that folder, you can do it yourself by placing the .po and .mo files in it. Restart Wordpress and it will pick them up.

3. Install languages for plugins and themes

3.1 First option: Let Wordpress download them

At this point, you got WP core translation files, but not the plugins or themes ones. To get all other translation files, go to Updates section under Dashboard, and click Check again button. At the bottom of the page you'll see a message New translations available. Click on the Update translations button, and WP will download all available translations for your plugins and themes.

3.2 Second option: place them yourself manually

As mentioned above, Wordpress must have write permissions on languages directory, in other case you'll have to download all translation files manually. Place .po and .mo translation files for installed themes in languages/themes subdirectory, and translation files for installed plugins in languages/plugins subdirectory.

2
  • I had to add languages and add a .mo file as described in another answer. This is useful.
    – Rolf
    Jun 14, 2018 at 13:52
  • At the bottom of the relevant WP translation team page, be sure to select "Machine Object Message Catalog" and click "Export". Name it something nice and copy the .mo file to the languages folder. Oct 7, 2018 at 12:03
2

This problem is occurred in WordPress 4.0 and above versions also , because of permissions. Because of this WordPress cannot download the language packs. To add other languages in admin panel general settings , add this code inside wp-config.php just below the define('WP_DEBUG', true);

define('FS_METHOD', 'direct');

After saving changes check on admin panel general settings , now you will find number of languages. And if in case you will not find your language inside a list , try to add a language packs using plugin or add through code. You can follow official documentation for this.

0
1

I had the exact same problem. In case you have a multi-language plugin installed, you have to deactivate it(or delete it) and then you will be able to change the language to whatever you need. I had this problem specifically with Multisite Language Switcher.

PS. i checked before and i had the language files in my wordpress installation.

0
1

I had the same problem and I spent hours to read different complicated solutions.

Just 3 very basic steps.

1 Create a new folder in your ‘/wp-content’ directory called ‘/languages’
2 Copy in this folder the language pack of the language you want to install
(download it from https://make.wordpress.org/polyglots/teams/)
3 Choose the new language through the interface

Details here: https://www.linuwi.com/tutorials/how-to-change-wordpress-language/

1

Like Ivan described above, make sure PHP has the right file permissions so it can create a /languages subdirectory under the /wp-content directory. If it has, it will create the directory automatically and let you select a language unter Settings > General Settings > Site Language.

1

In my case since I was using WPML for translation, I had to go to the WPML Setup Page, to change my default language.

enter image description here

0

I've solved this issue defining the right way wordpress search for the wp-content folder.

In wp-config.php you can specify the position of the wp-content folder. Based on the system you are working on, try to set the following code:

define('WP_CONTENT_DIR', realpath(dirname(__FILE__) . '/wp-content'));

or this one:

define('WP_CONTENT_DIR', realpath($_SERVER['DOCUMENT_ROOT'] . '/wp-content'));
1
  • I tried both. Neither worked.
    – Janosh
    Jun 19, 2017 at 9:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.