If you are having a notice about writing the .mo files please read this doc

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 12 replies, has 2 voices.

Last updated by Jean-François 2 months, 3 weeks ago.

Assigned support staff: Andreas W..

Author Posts
August 16, 2019 at 2:11 pm

Jean-François

I am trying to: Translate strings from French to English using String translation and have the English translation appear on the English page.

Link to a page where the issue can be seen: hidden link

I expected to see: When you scroll down, a small "Back to top" button appears on the lower right side. I should read "Back to top" on the English version of the page.

Instead, I got: The button read "Retour en haut", the original string in the theme.

August 16, 2019 at 2:38 pm
August 16, 2019 at 4:05 pm #4407519

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

The FTP access is currently sadly refused.

Could you please trz to replace the GetTextCall with:

esc_html_e

Let me know if this solved the issue.

Kind regards
Andreas

August 16, 2019 at 4:22 pm #4407563

Jean-François

Sorry, I gave you the wrong config for FTP. How should I give it to you?

I tried using

esc_html_e

and it doesn't change.

August 16, 2019 at 8:58 pm #4408203

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

Please make a backup of site files and database before providing us access.
If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Kind regards
Andreas

August 19, 2019 at 12:33 pm
August 20, 2019 at 11:16 pm #4426791

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

My appologies for the delay on answering but we had many requests since yesterday.

I have been checking various options that could cause the string for not getting translated, but the reason here seems to be lying in the coding of the custom theme.

Please take note that our support policy does not cover any custom works.
For more information take a look into our support policy:
https://wpml.org/purchase/support-policy/

I would advise you to reach out to the theme developer or contact one of our contractors for having a look into this taks.

https://wpml.org/contractors/

We hope for your understanding.

Kind regards
Andreas

August 22, 2019 at 7:58 pm #4442623

Jean-François

Hi Andreas,

I think I finally narrowed down the issue:

This is a multisite and I'm using the switch_to_blog() function to loop all subsites and gather their display title, URL and sometimes other info to build a menu.

The string I gave you as an example is in header.php and before that are a couple of includes of template parts that are using switch_to_blog(). When I remove the includes, the string shows up translated as it should.

I've seen a few support threads relating to the same issue but I can't figure out what the solution is. From what I understand, the strings need to be translated in all the sites because it's in the database, but I don't get why because the string is not gathered from the other sites; it's always in the current one.

I'm also using switch_to_blog() a second time after my loop with the current blog ID to make sure I'm coming back to the site we're viewing.

I'm not sure this constitutes custom work since multisites are a native feature of WP and the bug doesn't seem to be caused by anything funky in our theme. The sole fact that we call switch_to_blog() causes the translated strings to stop showing.

Your help would be appreciated regarding this.

Thanks

August 26, 2019 at 10:22 am #4457553

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you very much for your patience.

I was revising your header.php file and the mentioned included template parts. Sadly, after some time the server access has been rejected. Could you please provide me a copy of the code in order to consult our second tier support?

Kind regards
Andreas

August 26, 2019 at 10:26 am #4457633

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Additional to my last message also make sure to adjust the WP Memory Limit to 256M.

Your current values are:

PHP MemoryLimit 500M
WP Memory Limit 64M
Add this code to your wp-config.php to increase WP memory:

/* Memory Limit /
define('WP_MEMORY_LIMIT', '256M');

Paste it just before:

/ That's all, stop editing! Happy blogging. /

These settings can be limited directly by your hosting provider, so I recommend you to contact and ask them to modify them directly.
If you can get even higher values It would be great.

https://wpml.org/home/minimum-requirements/
Note: WPML needs a minimum WP Memory limit of 128M to work only under a minimal environment, it means,
with a default theme and not other plugins installed.

Kind regards
Andreas

August 26, 2019 at 12:49 pm #4458699

Jean-François

Hi,

I just tested the credentials and they still work. Could you provide me your IP address, maybe our firewall blocked the connection (happens fairly often).

I increased the WP memory limit.

Thank you

August 26, 2019 at 1:47 pm #4459333

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hi,

Sure I can:

My public IP is 179.6.210.166

Leave me short notice once access is granted.

Kind regards
Andreas

August 26, 2019 at 4:56 pm #4460465

Jean-François

I just unblocked your IP, let me know if you can connect again.

August 26, 2019 at 6:06 pm #4460759

Andreas W.
Supporter

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

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for providing access.

I have forwarded the issue including the code of the header.php to our 2nd Tier Support and I will be back once I received feedback.

Thank you for your patience.

Kind regards
Andreas

August 26, 2019 at 6:26 pm #4460801

Jean-François

My issue is resolved now. Thank you!