Sauter la navigation

Ce sujet est résolu. Voici une description du problème et de la solution.

Problem:
The client was facing issues with translating the footer into French on their WordPress site. The English footer was appearing instead of the French one, despite attempts to edit it directly in the footer editor. Additionally, there was a PHP error related to the Complianz GDPR plugin, indicating that translation loading was triggered too early.
Solution:
We advised the client not to edit the translation directly from the footer editor but to use WPML > String Translation to manage footer translations. For the PHP error, it was identified as a known issue with a fix available in the newer version of the Complianz plugin. We provided links to the relevant documentation and updates:

We corrected the language settings for the footer strings from English to French to resolve the translation issue.

If this solution does not resolve your issue or seems irrelevant due to updates or different circumstances, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML French Support Forum.

Il s'agit du forum d'assistance technique de WPML, le plug-in multilingue pour WordPress.

Il est accessible à tous, toutefois seuls les clients de WPML peuvent y publier leurs messages. L'équipe du WPML répond sur le forum 6 jours par semaine, 22 heures par jour.

Marqué : 

Ce sujet contient 0 réponse, a 0 voix.

Dernière mise à jour par martinP-99 Il y a 2 jours et 14 heures.

Assisté par: Ilyes.

Auteur Articles
janvier 17, 2025 à 8:39 pm #16608163

martinP-99

Contexte de la question:
I tried to change the footer and I end up with the English Footer, but in French, and can't find the way to make the French one and translate the English correctly. The issue can be seen at lien caché.

Symptômes:
Instead of seeing the expected French footer, I see the English footer. Look at the bottom of the page for 3 links after the logo and before the Social buttons.

Questions:
How can I correctly translate the footer into French?
Why is the English footer appearing instead of the French one?

janvier 17, 2025 à 10:44 pm #16608417

Ilyes
Supporter

Les langues: Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

Thank you for contacting WPML support team,

Please let me know if you would like to continue our conversation in French or English as this is the French Forum.

From the screenshot you shared, this seems to be a footer applied directly from the theme options,

The issue here, is that you are not supposed to create/edit the translation directly from the footer editor, but rather, you need to translate it from WPML > String translation.

In your case, create the French footer, then go to WPML > String translation and search for the phrases and links in the footer there.

If you are still not able to translate it, please share access to your site, I will take a closer look at it and see how we can translate it.

Below you will find the access form where you can share your credentials privately.

Best,

janvier 20, 2025 à 2:02 pm #16613828

martinP-99

Hello, have you look at my problem/site?

janvier 21, 2025 à 5:10 am #16616352

Ilyes
Supporter

Les langues: Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Yes, but the site is currently experiencing a critical error, I just tried to login but the site is not working for me, could you please check again? : lien caché

Thanks,

janvier 21, 2025 à 6:36 am #16616430

martinP-99

Hello,

I have turned on debuting. Could you help me with it.
Something is now wrong with Translation process.

Thank you,

janvier 21, 2025 à 9:27 am #16617276

martinP-99

Here the error.
( ! ) Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

complianz-gdpr

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/vhosts/dimensiontransport.com/httpdocs/wp-includes/functions.php on line 6114
Call Stack
# Time Memory Function Location
1 0.0003 479328 {main}( ) .../index.php:0
2 0.0004 480672 require( '/var/www/vhosts/dimensiontransport.com/httpdocs/wp-blog-header.php ) .../index.php:17
3 0.0006 490328 require_once( '/var/www/vhosts/dimensiontransport.com/httpdocs/wp-load.php ) .../wp-blog-header.php:13
4 0.0008 500448 require_once( '/var/www/vhosts/dimensiontransport.com/httpdocs/wp-config.php ) .../wp-load.php:50
5 0.0017 587168 require_once( '/var/www/vhosts/dimensiontransport.com/httpdocs/wp-settings.php ) .../wp-config.php:111
6 0.6270 51977432 do_action( $hook_name = 'plugins_loaded' ) .../wp-settings.php:559
7 0.6270 51977648 WP_Hook->do_action( $args = [0 => ''] ) .../plugin.php:517
8 0.6270 51977648 WP_Hook->apply_filters( $value = '', $args = [0 => ''] ) .../class-wp-hook.php:348
9 0.7882 62165872 {closure:/var/www/vhosts/dimensiontransport.com/httpdocs/wp-content/plugins/complianz-gdpr/complianz-gpdr.php:235-237}( '' ) .../class-wp-hook.php:324
10 0.7882 62166032 COMPLIANZ::get_instance( ) .../complianz-gpdr.php:236
11 0.7882 62166456 COMPLIANZ->__construct( ) .../complianz-gpdr.php:159
12 0.8088 63604856 cmplz_config->__construct( ) .../complianz-gpdr.php:91
13 0.8095 63706992 require_once( '/var/www/vhosts/dimensiontransport.com/httpdocs/wp-content/plugins/complianz-gdpr/config/countries.php ) .../class-config.php:268
14 0.8095 63706992 __( $text = 'US', $domain = 'complianz-gdpr' ) .../countries.php:59
15 0.8095 63706992 translate( $text = 'US', $domain = 'complianz-gdpr' ) .../l10n.php:306
16 0.8095 63706992 get_translations_for_domain( $domain = 'complianz-gdpr' ) .../l10n.php:194
17 0.8095 63706992 _load_textdomain_just_in_time( $domain = 'complianz-gdpr' ) .../l10n.php:1408
18 0.8109 63711880 _doing_it_wrong( $function_name = '_load_textdomain_just_in_time', $message = 'Translation loading for the

complianz-gdpr

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later.', $version = '6.7.0' ) .../l10n.php:1370
19 0.8112 63719720 wp_trigger_error( $function_name = '', $message = 'Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

complianz-gdpr

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7'..., $error_level = ??? ) .../functions.php:6054
20 0.8115 63831480 trigger_error( $message = 'Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the

complianz-gdpr

domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the

init

action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7'..., $error_level = 1024 ) .../functions.php:6114

janvier 21, 2025 à 9:18 pm #16620599

Ilyes
Supporter

Les langues: Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

Hello,

This is a known issue since WP 6.7, most plugins have already fixed it with WP 6.7.1 as reported here : https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/

Here is what Complianz team achieved : https://wordpress.org/support/topic/function_load_textdomain_just_in_time-msg-in-wp-6-7-1/

They posted a fixed version here : lien caché

Let me know if you need help installing it.

For the footer, it turns out the footer is built directly from the theme option pages : lien caché

This kind of content can be translated from WPML > String translation as shown here : lien caché

In this case, it turns out many strings are detected as english instead of french which creates a confusion, so I simply corrected that by selecting the french string and changing its language to french : lien caché

The footer should now be translated correctly : lien caché

Best,

janvier 21, 2025 à 10:14 pm #16620658

martinP-99

OK,

Why Complianz doesn't do a normal upgrade? Yes, please install it for us.

Thank you.

janvier 22, 2025 à 1:51 am #16620884

Ilyes
Supporter

Les langues: Français (Français )

Fuseau horaire: Pacific/Easter (GMT-05:00)

You can actually check with their team as it seems the last version they posted has a fix for this,

I recommend checking with them if you want a proper update as this workaround might not be a permanent solution.

So let me know if you still want to install the temporary version,

janvier 25, 2025 à 1:13 am #16633001

martinP-99

All is fine, waiting for Complianz update.

Thank you.