Skip to content Skip to sidebar

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.

Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

Tagged: 

This topic contains 11 replies, has 2 voices.

Last updated by Andreas W. 1 year, 5 months ago.

Assisted by: Andreas W..

Author Posts
February 23, 2024 at 2:59 pm #15338384

cdhsC

I am trying to:
Translate page content, but only some of the content gets translated while the rest remains in the original language.

Link to a page where the issue can be seen:
Username: devco4kids
Password: tree-fort

Untranslated original English page:
hidden link

Translation attempt in Spanish:
hidden link

I expected to see:
Within the Advanced Translation Editor, I've set the Spanish translation for every piece of content to be "[translated]", so I should not be seeing any English words in the body of the page.

Instead, I got:
As you can see at the above links, many parts of the page are still in English. Within the Advanced Translation Editor, I can see those English phrases and the corresponding [translated] text they should be translated to, but for some reason they are not.

What I've already tried:
I cleared the local and server caches. I've moved the site to another server (the development environment above). I've tried deleting the translated version of the page and re-creating it. I've tried copying the content of the page into a brand new page with a brand new translation attached to it. In all cases, still, not everything gets translated.

February 23, 2024 at 9:12 pm #15339396

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Could you please increase your WP Memory limit to 256M? 128M is the minimum required by WPML.
Your current values are:

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

define('WP_MEMORY_LIMIT', '256M');

Paste it just before:

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

Now, verify the current settings at WPML > Support > WordPress. Then complete the translation again.

These settings can be limited directly by your hosting provider, so I recommend you 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, which means, with a default theme and no other plugins installed.

Now, please apply the translation again.

If this will still not solve the issue, please let me know.

Best regards
Andreas

February 26, 2024 at 5:09 pm #15345591

cdhsC

Thanks for reaching out Andreas. I was able to increase the WP Memory Limit to 512M, so quite a bit above the minimum. Unfortunately, the issue persists. What can we try next?

February 27, 2024 at 2:49 pm #15349645

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

I would like to offer to have a closer look at the problem and request temporary access (wp-admin and FTP) to the website to investigate this issue further.

You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it.

IMPORTANT
Please be sure to make a backup copy of the website and database before allowing us access.
If you can't see the wp-admin / FTP fields, your post and website credentials are set as PUBLIC. DO NOT publish the data unless you see the required wp-admin / FTP fields.

The private response form looks like this:
hidden link

Next time you reply, click "I still need assistance."

Video:
hidden link

Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form.

Best regards
Andreas

February 27, 2024 at 11:07 pm #15351610

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

The "Hero Tabs" and the "Vertical Tabs" Blocks are being shipped together with your custom theme and it is the responsibility of the author of those blocks to make them translatable with WPML:

https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/

These configs will make strings available inside the WPML Translation Editor and the issue seems not to be the config in this case, as we can obtain all the strings on the Advanced Translation Editor, but there seems to be an issue with how some sections of the blocks are being rendered on Frontend.

I will try to have a closer look at the theme and those blocks and let you know if I have some usable feedback.

Best regards
Andreas

February 28, 2024 at 6:01 pm #15355402

Andreas W.
WPML Supporter since 12/2018

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

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

Could you please install your custom theme on the following test site and import your ACF Groups, so that I can take a close look at the theme code and check for errors?

One-Click-Login:
hidden link

This test site does not come with FTP access, but you can use the File Manager Plugin, if necessary.

Please do not migrate your whole website onto this test site.

February 29, 2024 at 2:40 pm #15358664

cdhsC

Done! Thanks again for your continued support.

February 29, 2024 at 6:53 pm #15360209

Andreas W.
WPML Supporter since 12/2018

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

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

I have reviewed the theme's code and I sadly have to inform you that I am not able to figure out why the block's translations are not rendered as expected.

Take note, that I offered voluntarily to have a look into this to give advice, but our support is not taking any responsibility for custom code.

WPML Support Policy:
https://wpml.org/purchase/support-policy/

As long the blocks are coded to the WordPress standards there should not be any issues:
https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/

I can see in some places, that the author of the theme did not exactly follow this guide.

I suggest you contact the author of your theme and ask him to have a look into this.

March 1, 2024 at 4:18 pm #15363955

cdhsC

Thanks Andreas, could you give me a few specific examples you noticed of where code doesn't match up to the guide?

March 1, 2024 at 4:25 pm #15363993

Andreas W.
WPML Supporter since 12/2018

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

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

One example is:

WordPress dependencies
To encourage reusability between features, our JavaScript is split into domain-specific modules which export one or more functions or objects. In the Gutenberg project, we’ve distinguished these modules under top-level directories. Each module serve an independent purpose, and often code is shared between them. For example, in order to localize its text, editor code will need to include functions from the i18n module.

/**
 * WordPress dependencies
 */
import { __ } from '@wordpress/i18n';

Source:
https://developer.wordpress.org/block-editor/contributors/code/coding-guidelines/

The code of your theme is doing it differently.

Now, I can not say if this is the whole source of the issue, but debugging huge amounts of custom code is something that our support sadly can not cover.

I hope for your understanding.

Best regards
Andreas

March 4, 2024 at 2:01 pm #15370005

cdhsC

Question for you: is WPML design to pick up strings from custom blocks and wpml-config.xml is just there for developers to add strings the plugin doesn't pick up automatically for some reason; or, is a wpml-config.xml entry *required* for each string that exists in a custom block, otherwise it for certain won't be translated?

I think what I'm seeing is that InnerBlocks get translated within custom blocks, since they're composed of core blocks, while any custom attributes on the blocks are not translated. The theme doesn't have a wpml-config.xml, so that may be the culprit if it's absolutely required for WPML to actually work.

March 5, 2024 at 9:04 am #15373198

Andreas W.
WPML Supporter since 12/2018

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

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

Hello,

Yes, this is correct. You will need to investigate the source code of the block on Frontend.

Each string in a block needs a proper config. You can use the XPath of each HTML Elementor of your block.

Guide:
https://wpml.org/documentation/support/language-configuration-files/make-custom-gutenberg-blocks-translatable/#registering-gutenberg

Best regards
Andreas

The topic ‘[Closed] Some block content is not translated while some is.’ is closed to new replies.