Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client's strings were not showing as translated on the front end.
Solution:
We recommended adding a specific line of code to the theme's functions.php file to ensure the textdomain is loaded correctly. Here are the steps to follow:
1. Navigate to

wp-content/themes/altair-bsp/functions.php

.
2. Add the following code:

load_theme_textdomain( 'altair-bsp', get_template_directory().'/languages' );

This solution is a workaround, and it's possible that the client had a similar fix in place previously in a different file named functions_orig.php.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please do not hesitate to open a new support ticket in the WPML support forum.

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.

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 5 months ago.

Assisted by: Christopher Amirian.

Author Posts
February 6, 2024 at 8:48 am

davidH-95

Strings are not showing as translated in the front end

But if I enable auto register they show as translated

February 6, 2024 at 9:28 am
February 6, 2024 at 9:43 am #15269926

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

The issue is reported to the second tier support.

I will update you here as soon as I have an answer.

Thanks.

February 6, 2024 at 2:33 pm #15272374

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi there,

I have an answer from the second-tier support:

The user's theme does not appear to load the textdomain associated with these strings.
Workaround go to: wp-content/themes/altair-bsp/functions.php
add this code somewhere:

load_theme_textdomain( 'altair-bsp', get_template_directory().'/languages' );

It seems you had this workaround before, as the same thing previously:

wp-content/themes/altair-bsp/functions_orig.php

load_theme_textdomain( THEMEDOMAIN, get_template_directory().'/languages' );

Please get back to us with the result.

February 8, 2024 at 8:25 pm #15283339

davidH-95

Awesome, this solved the issue.
Thank you very much Christopher.

Kind regards,
David