Skip Navigation

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

Problem:
The client is experiencing issues with translating strings in THE EVENTS CALENDAR on their WordPress site. The string translation only functions correctly when the String Scan feature is enabled.
Solution:
We recommend the following steps to resolve the issue:
- Access your site's file system via FTP and navigate to the /wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Views/Traits/ folder.
- Open the List_Behavior.php file and locate line 39.
- Replace the existing code:

if ( ! isset( $this->context ) ) {

with:

load_plugin_textdomain('the-events-calendar', false, plugin_basename(dirname(__FILE__)) . '/languages/');<br />if ( ! isset( $this->context ) ) {

- Save the changes and clear the caches on your site and browser.

If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, 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 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 4 replies, has 2 voices.

Last updated by Prosenjit Barman 7 months, 3 weeks ago.

Assisted by: Prosenjit Barman.

Author Posts
July 2, 2024 at 10:21 am

daniL

Background of the issue:
I am trying to translate some THE EVENTS CALENDAR strings on my site hidden link. It works fine only when I set the String Scan to on.

Symptoms:
String translation only works when the String Scan is turned on.

Questions:
Why does the string translation only work when the String Scan is turned on?
Is there a permanent solution to translate THE EVENTS CALENDAR strings without keeping the String Scan on?

July 2, 2024 at 11:43 am
July 2, 2024 at 3:43 pm #15876725

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

I have thoroughly investigated the issue for several hours, but unfortunately, none of the solutions seem to be working. For further investigation, I have forwarded the issue to our 2nd tier team along with all my findings and information. I hope we will be able to figure out a solution soon.

As soon as I have any updates, I will inform you immediately. Thank you for your patience and cooperation while we are working on this.

Best regards,
Prosenjit

July 8, 2024 at 7:20 am #15910482

daniL

Hi, any news about this?
Thanks!

July 8, 2024 at 10:15 am #15912260

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
I hope you're doing well.

We have checked and successfully replicated the issue on our sandbox. It appears that the MO files aren't being processed correctly, which is causing the problem.

Unfortunately, we don't have a solution or workaround available at this time. We apologize for the inconvenience. However, our development team is actively working on finding a solution. I will inform you promptly as soon as there are any updates.

Thank you for your patience and kind cooperation in this matter.

Best regards,
Prosenjit

July 10, 2024 at 6:24 am #15925837

Prosenjit Barman
Supporter

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi!
I hope you're doing well!

I'm pleased to inform you that our development team has successfully identified the root cause of the issue and found a solution. Please try the following steps to solve the issue.

- Access the file system of your site using FTP and open the List_Behavior.php file located in the /wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Views/Traits/ folder.
- Scroll to line 39 and replace the following code:

if ( ! isset( $this->context ) ) {

with this code:

load_plugin_textdomain('the-events-calendar', false, plugin_basename(dirname(__FILE__)) . '/languages/');
if ( ! isset( $this->context ) ) {

- Save the changes.
- Clear the caches from your site and browser and then check again.

Please try and let me know if that helps to solve the issue. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

July 10, 2024 at 9:21 am #15926908

daniL

Worked perfect!
Thanks, Prosenjit!