Page 1 of 1

Language files do not work any more.

Posted: 10 Mar 2018, 16:04
by mbrsolution
Hello Colin and Drake, I would like to ask you for a favor if you don't mind.

Can you test a language file. I think the language files stopped working after WordPress 4.8.1 or maybe even earlier. Currently I am testing the latest WordPress version 4.9.4 and the Spanish translations are not coming through.

I have downloaded the latest Spanish po and mo files from the following URL and tried all sorts of settings and even added the define('WPLANG', 'es_ES'); in wp-config.php (Which is no longer needed) file with no success.

I found this tutorial interesting. Please check the following URL

I was wondering if you could look into this matter and carry out a test yourself.

Thank you kindly.

Re: Language files do not work any more.

Posted: 14 Mar 2018, 15:04
by drake
Hi Miguel,

As of WordPress 4.0 there is no need to make any change in configuration files for site language. For a clean installation, for any version after 4.0., WordPress will ask you to select the site language before entering the admin username and password.
Of course, can change the site language at any time by going at Settings -> General menu as you saw in that tutorial.

As of WordPress 4.7. any user can change the language for backend, while the frontend will stay in the language selected from General panel. Because I hate the backend in Romanian and I don't know Dutch or Spanish or whatever, I always go at Users -> Your Profile and change the language to English for my profile on any site, no matter the language selected for frontend (before WordPress 4.7. I've used plugins for doing this). So, for actual version of WordPress, not need a filter/function/plugin for this change anymore.

Now, for Suffusion, the language files need to be downloaded from pool and named correctly (by eg. and es_ES.po) then uploaded in /translation/ directory from suffusion folder or child theme folder. If you use a child theme, check it's folder name: "my-child-theme" is good / "My child theme" is bad, some servers will fail to read blank spaces in names or will interpret upper or lower cases as different characters.

Not at last, if you use a child theme and have some custom functions added there, try to switch to Suffusion at Appearance (switch to the parent theme) and see if the translation works (assuming that everything is correct, your WordPress works in Spanish, the files are uploaded correctly). If works, the problem is in your files.

And... don't forget about debugging procedure... disable all plugins.... and so on...

Re: Language files do not work any more.

Posted: 14 Mar 2018, 15:37
by mbrsolution
Thank you Drake for your extensive information. I had already carried out everything that you mentioned because I already have a few Spanish sites.

I think I found the issue.

When you download the Spanish translation from the following site ... es/default, the files are downloaded as such.

However the above does not work because WordPress cannot read those files. If you rename the po and mo files to es_ES.po and it will work. So I think the solution would be to make the changes in Suffusion core files to accept the files downloaded from ... es/default. Or add some explanation letting the person know that after they download the files they have to rename them. In this case if it is the Spanish translation it would be renamed to es_ES.po and

What do you think about my idea?

Kind regards

Re: Language files do not work any more.

Posted: 14 Mar 2018, 15:55
by drake
I think that the naming is a problem of pool. For sure I cannot have any influence on this problem. I cannot add there explanations, or change anything.

The naming with only language characters, without "suffusion" is coming from the times when translations was packed with the theme, so, always they was named in this way.

In my article about child themes ... suffusion/, at Example 1 - Translations, I specified: Save the file with your country code (by eg. for Romanian ro_RO.po)

And that post is linked in the "Read this first" post from the Translation forum from here, from Aquoid...

I've updated "Translations - READ THIS FIRST" post, trying to be more explicit about this naming issue.