Language files do not work any more.

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Language files do not work any more.

Postby mbrsolution » 10 Mar 2018, 16:04

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 http://pool.aquoid.com/translations/projects/suffusion 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 https://optimizerwp.com/change-wordpress-language/.

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

Thank you kindly.
Manuel Ballesta Ruiz
http://mbrsolution.com
mbrsolution
 
Posts: 75
Joined: 01 Jan 2012, 15:58
Location: Australia

Re: Language files do not work any more.

Postby drake » 14 Mar 2018, 15:04

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. es_ES.mo 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...
drake
 
Posts: 6212
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania

Re: Language files do not work any more.

Postby mbrsolution » 14 Mar 2018, 15:37

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 http://pool.aquoid.com/translations/pro ... es/default, the files are downloaded as such.

suffusion-es.mo
suffusion-es.po


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 es_ES.mo it will work. So I think the solution would be to make the changes in Suffusion core files to accept the files downloaded from http://pool.aquoid.com/translations/pro ... 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 es_ES.mo.

What do you think about my idea?

Kind regards
Manuel Ballesta Ruiz
http://mbrsolution.com
mbrsolution
 
Posts: 75
Joined: 01 Jan 2012, 15:58
Location: Australia

Re: Language files do not work any more.

Postby drake » 14 Mar 2018, 15:55

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 https://www.drafie-design.nl/3-5-easy-s ... 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.
drake
 
Posts: 6212
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania


Return to Support Requests

Who is online

Users browsing this forum: Bing [Bot] and 9 guests