Skip Navigation

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

Problem:
You are trying to translate content on your site, but the translation process is stuck and the changes cannot be seen on the website.
Solution:
We’ve investigated the issue affecting your translation jobs and identified the root cause.

The problem appears to be related to your server’s character encoding settings. Specifically, it looks like the server’s locale is not explicitly set, and it defaults to an older encoding format (ISO-8859-1) instead of the required UTF-8 encoding. UTF-8 is essential for correctly handling Chinese characters.

As a result, when a string such as 圖示清單:文字 (encoded in UTF-8) is processed using the PHP function ucwords, the encoding unexpectedly switches to ISO-8859-1. This causes issues in our logic when generating the XLIFF files used to submit translation jobs. Essentially, this encoding mismatch leads to corrupted data in the translation files, which then prevents translation jobs from being processed correctly and causes them to get stuck (specifically in status 6).

The XLIFF file being generated on your server is improperly encoded with ISO-8859-1.

This leads to corrupted translation units, with the file being abruptly cut off.

The issue stems from the labelize() function in the WPML plugin, which uses ucwords()—a function not suitable for non-ASCII characters like Chinese.

Workaround solution :

We’ve modified our internal utility function to use mb_convert_case() instead of ucwords(), which correctly handles UTF-8 encoding. This change resolves the issue on your site, allowing translation jobs to complete successfully.

Here’s the updated function. Please note that this change was made directly within the WPML plugin files (sitepress-multilingual-cms/classes/utilities/Labels.php)

From :

public static function labelize( $string ) {
        return ucwords(
            strtr(
                $string,
                [
                    '-' => ' ',
                    '_' => ' ',
                ]
                )
            );
    }

To :

public static function labelize( $string ) {
    return mb_convert_case(
        strtr(
            $string,
            [
                '-' => ' ',
                '_' => ' ',
            ]
        ),
        MB_CASE_TITLE,
        'UTF-8'
    );
}

Anyway, our developers have fixed this and an update will be available in the next release.

Please note that the solution provided might be outdated or not applicable to your specific case. 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. 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.

Tagged: ,

This topic contains 0 replies, has 0 voices.

Last updated by cindyC-2 9 hours, 12 minutes ago.

Assisted by: Kor.

Author Posts
March 7, 2025 at 10:34 am

cindyC-2

Background of the issue:
I am trying to translate the content on my site. The issue can be seen on this page: hidden link.

Symptoms:
Translation stuck in process and can't be seen on the website.

Questions:
Why is the translation process not completing?
How can I resolve the issue of the translation being stuck?

March 7, 2025 at 11:10 am
March 10, 2025 at 1:44 am #16794037

cindyC-2

Some of the Translation are still unable to be complete. Like this page can't be complete translation to English. hidden link. I would really appreciate if you can still help me fic this. Thanks a lot.

By the way, the home page of japanese Language went wrong after the support team trying to fix the problem mentioned above. I wonder if you can help on this issue or not.

March 10, 2025 at 5:19 am #16794294

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience and I apologize for the delay in response due to the weekends. I'm checking on this and I will come back to you as quickly as possible.

March 10, 2025 at 5:20 am
March 10, 2025 at 6:04 am
March 10, 2025 at 8:32 am #16794791

cindyC-2

Hello Kor,

I have closed the duplicated ticket from the other supporter. Please help supporting this issue from your side. Thank you so much.

March 10, 2025 at 9:50 am #16795463

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for responding. It appears that a similar ticket has already been opened, and my colleague has already escalated it to our second-tier support. Could you please share FTP access to your server so that I can enable debugging mode to investigate further? I apologize for any inconvenience caused.

March 11, 2025 at 1:33 am
March 11, 2025 at 5:47 am #16799362

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for sharing the credentials. I've escalated this to our 2nd Tier Support and they will check and revert back to us as quickly as possible.

March 12, 2025 at 3:31 am #16804842

cindyC-2

Thank you so much. Looking forward for your answer.

March 14, 2025 at 1:34 am #16814103

cindyC-2

Hello Kor,

I wanted to follow up and check if there are any further updates. Thank you

March 14, 2025 at 1:35 am #16814104

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. Sorry, no updates yet from our 2nd Tier Support. But they are working on this.

March 14, 2025 at 2:41 pm #16817403

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I regret any inconvenience caused, our 2nd Tier Support checked and they are asking for a snapshot of the site. Alternatively, with your permission, I can create one myself. For this purpose, I typically recommend using the free plugin "Duplicator." If you're already familiar with Duplicator (https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded.

To guide you further, please adhere to these instructions:

1. View the Duplicator instructions video: hidden link

2. Consult WPML's instructions on providing supporters with a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/

3. If the archive file exceeds 400MB, please use Duplicator's file filters to exclude cache, wp-uploads directory, media, and archive files.

Once you have the archive file ready, kindly share the link with us. You can utilize platforms like Google Drive, Dropbox, or similar for file sharing, as the snapshot file might be large.

Please note that your next reply will be private, visible only to you and me. You can paste the file link there. Rest assured that once the issue is resolved, I will delete the local site.

March 17, 2025 at 4:08 am #16822848

cindyC-2

Sorry, I tried several times but still not able to dupilcate the site through Dupilcator. Could you simplely copy the site through the FTP access I provided? Or duplicate the site with the wp access I provided?