Skip to content Skip to sidebar

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

Problem:
The client reported that the translated strings for the Masterstudy LMS plugin were not showing on their website, despite having worked previously.
Solution: https://wpml.org/errata/l10n-php-performant-default-translated-strings-not-displaying-correctly/

If this solution does not resolve your issue, or if it seems outdated or irrelevant 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 the problem persists, please open a new support ticket.

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.

This topic contains 20 replies, has 2 voices.

Last updated by Shekhar Bhandari 1 year, 11 months ago.

Assisted by: Shekhar Bhandari.

Author Posts
May 27, 2024 at 5:58 am #15672009

adrienR-7

Thank you very much for beeing so helpful Shekhar.
I look forward to hearing from you.

June 5, 2024 at 5:13 am #15704758

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Our compatibility team checked the issue and suggested the following workarround:

Workaround
Open the app/public/wp-content/plugins/masterstudy-lms-learning-management-system/masterstudy-lms-learning-management-system.php file
Replace the following snippet (around line 15):

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

with

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

// WPML Workaround for compsupp-7393
function wpml_compsupp7393_filter_translation_file_format($format, $domain) {

    if ($domain === 'masterstudy-lms-learning-management-system') {
        return 'mo';
    }
    
    // Return the original format if the condition is not met
    return $format;
}
add_filter('translation_file_format', 'wpml_compsupp7393_filter_translation_file_format', 10, 2);

Please check if this helps.

Thanks

June 5, 2024 at 11:49 pm #15709051

adrienR-7

Thank you so much Shekhar! I confirm that this workaround is working. Which is great, that means you clearly understand the issue.

I have been giving this answer to my problem by one of you colleague, would that be the most safest and reliable solution for long term?

Cheers,

June 6, 2024 at 4:39 am #15709205

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, but in the meantime, we are also looking to see if you can release a permanant fix: you can monitor this url for the update: https://wpml.org/errata/masterstudy-lms-default-translated-strings-not-displaying-correctly/

Thanks

June 6, 2024 at 11:49 am #15710894

adrienR-7

A permanent fix would be amazing, thank you so much for looking into it.

Thanks,
Adrien

June 7, 2024 at 4:59 am #15713692

Shekhar Bhandari
WPML Supporter since 03/2015

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Sure, you can subscribe to the errata to get the updates.

Thanks