Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 10 replies, has 2 voices.

Last updated by Yvette 3 months ago.

Assigned support staff: Yvette.

Author Posts
June 16, 2020 at 11:11 am #6382625

davidN-51

Hello,

After the latest WPML updates, I have lost some theme translations. I have scanned the theme plugin files and can see that the strings are translated, but they now only show in English and French and not in German (strangely). Can someone please assist?

Thanks

June 16, 2020 at 11:51 am #6382979

davidN-51

How can we speak to a supporter in live chat, rather than waiting a long time for tickets to be answered?

Thank you

June 17, 2020 at 12:24 pm #6393907

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Hi

I´ll be helping you now.

1. Chat
It´s only available when it is open ....and when there is a high load on the queue, it´s ususally closed since all supporters are working to reduce the wait time for clients. Sorry.

2. Update and missing strings
Maybe it is faster if I take a look at your site?

Please provide access in the private area I am opening and also a URL to a page on the frontend where the strings are not translating.

Provide navigation steps on the backend to see where the strings were translated / configured originally

Thanks

June 17, 2020 at 3:30 pm #6395349

davidN-51

Hi Yvette,

Many thanks for your reply. Before I provide website credentials I had a couple of questions:

1. If I re-scan a plugin to find lost strings, it can add thousands of new strings to WPML (it imports all of them again). Does this slow down the front-end at all by adding thousands of unnessessary strings when we are only looking for 2 or 3 missing strings?

2. When I went to the admin area of our staging site today I had a WPML popup opening asking me if I want to generate .mo files (I attach a screen shot). I clicked OK and .mo files were generated. Why has it asked me this just now? Is this something to do with the latest update?

Thanks for a quick reply on that. I would be happy to give you website access so you can check this out. If I rescan the Theme plugin I know I can get the missing theme strings back, but I am just confused why they disappeared when they were working before (and only the German disappeared, not the French).

I checked in the /wp-content/languages/themes/ folder and notice that the Theme only has a .po file for German and not a .mo and .po (the French and English have both a .mo and .po). Could that be the issue?

Thanks in advance.

June 17, 2020 at 5:06 pm #6396039

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

The answer addresses both of your questions.

Basically, WPML String Translation is a table where you can enter alternative translations from what is in the delivered .po file But the actual string substitution mechanism is the same as what is used for the normal .po files. i.e. it is WordPress native functions

This means, WPML generates a new .po file and places it in the wp-content/languages/wpml /..your-pluginname-and-language-variant.mo

So, the impact on the performance should be no different than the impact of the normal .mo file

This is *not* the way that String Translation used to work and this is why you are seeing the message you cited.

Does this answer your question?

June 17, 2020 at 5:24 pm #6396111

davidN-51

Thanks. So I do not need a .mo file. Just a .po is enough for the translations to work right?

So basially my first step should be to rescan the Theme and then see if the strings popup for the translations I require? If the translated strings already exist (but the translations still do not show up front end) then I should delete these strings and try and rescan for them again...?

June 18, 2020 at 6:11 am #6399479

davidN-51

Hello Yvette,

Apologies for another email but I am confused. I just looked in the '/wp-content/languages/wpml' folder and there are no .po files. There are only .mo files. You had said there should be .po files.

Another point. The file size of all the .mo files in the '/wp-content/languages/wpml' folder are too small to contain any significant translations. I tested this and opened one up, and it had very little content.

Secondly, in the '/wp-content/languages/themes' folder I see there are my theme .mo and .po files for all languages (except German which just has a .po file). I looked at this German .po file and these translations which are missing are there and translated. So it seems the system is not using that .po file?

Maybe you can help me on this. I'm a little confused here as whether the WPML system is correctly setup.

June 18, 2020 at 6:47 am #6399703

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

I´m sorry for the confusion. I mis-typed.

We store .mo files in the directories and we load .po files to the String Table. This is the same as any WordPress theme/plugin. The WordPress mechanism will only read .mo files...you can edit .po files. I hope this clears the confusion.

The wpml .mo files may only hold the DIFFERENCES between the theme/plugin strings and what you have modified.

Here is more on how WordPress uses .mo/.po files and how you, as a user, can modify the delivered .po files so that an update will not overwrite any new .mo files you have saved.

hidden link
hidden link

June 18, 2020 at 7:03 am #6399787

davidN-51

Hi Yvette,

Thanks for your reply. Well that might be the issue. For the German language I only have a .po file in the /wp-content/languages/themes' folder, where the other languages also have a .mo file. As you said, wordpress only reads .mo files.

So do you know how I can create a .mo file for the German langauge from the .po file?

Thanks again

June 18, 2020 at 7:14 am #6399881

davidN-51

Hi Yvette,

OK I solved the issue (with your help) and found a way to convert .po to .mo files.
So I think that is everything working. Thanks so much for explaining how these .mo and .po file work.

Have a god day. You can close this ticket.

June 18, 2020 at 9:01 am #6401215

Yvette
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+02:00)

Great! I´m happy to hear this. Closing.