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.

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

Supporter timezone: Europe/Kyiv (GMT+03:00)

This topic contains 4 replies, has 0 voices.

Last updated by jeremiahH 4 hours, 55 minutes ago.

Assisted by: Andrey.

Author Posts
May 15, 2025 at 6:37 pm #17038440

jeremiahH

Background of the issue:
I have a string on the homepage that is hardcoded in the theme, 'Built for the New Reality'. We have the French Canadian translation yet it is not showing it on the site when viewing in French Canadian. I have tried saving the page, sync theme translations, changing the translated string in String Translation, and cleared page cache. I am seeing the translated string on our staging working fine, just for some reason not on our live site.

Symptoms:
Translated hardcoded strings are not appearing on the live site in French Canadian.

Questions:
Why is the translated string not appearing on the live site?
What steps can I take to ensure the translation appears correctly?

May 15, 2025 at 9:20 pm #17038809

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Can you show me where and how it was hardcoded in the screenshots? I want to ensure that I fully understand this so that I can provide the best possible solution. You can also share the code here where it is hardcoded.

May 16, 2025 at 8:05 pm #17043318

jeremiahH

Hi Andrey,

I've attached the screenshot of the template and the snippet below:

<div class="homepage-feature">
<p class="home-intro"><?php the_field('header_text'); ?></p>
<p class="banner-values"><?php _e('Built for the New Reality', 'html5blank'); ?></p>
<?php $button = get_field('button') ?>
">


</div>

I also sent a screenshot of the String Translation dashboard and it shows that it recognizes the "Built for the New Reality" string and where it should be appearing.

Screenshot 2025-05-16 at 1.03.40 PM.png
Screenshot 2025-05-16 at 1.03.33 PM.png
Screenshot 2025-05-16 at 1.03.23 PM.png
Screenshot 2025-05-16 at 1.02.17 PM.png
May 16, 2025 at 8:18 pm #17043453

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Do you load the html5blank textdomain somewhere in your current theme? For example, https://codex.wordpress.org/I18n_for_WordPress_Developers#Loading_a_Text_Domain .

You can also try to load the textdomain in WPML → Theme and plugins localization → Localization options.

May 21, 2025 at 6:33 pm #17058752

jeremiahH

Hi,

We do load the html5blank textdomain in our functions.php like so:

function html5blank_load_textdomain() {
load_theme_textdomain('html5blank', get_template_directory() . '/languages');
}
add_action('after_setup_theme', 'html5blank_load_textdomain');

I did just have to update it because I noticed it was in an odd function that was:
if (function_exists('add_theme_support')) {}

I moved it out of this and updated to the first snippet where it loads after theme setup. That also works with out sites where we have WPML.

I did run theme localization again but it hasn't updated it. I also tried saving the page and clearing my site cache. But it still hasn't updated.