Please make sure to update to WPML 4.3.6 and check our list of Known Issues before reporting

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.

Our next available supporter will start replying to tickets in about 5.67 hours from now. Thank you for your understanding.

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

Problem: How do I translate the 404 page?

Solution: It looks like your theme has a built in 404 page template. The correct way to translate this would be to translate the strings within this page. For example, the theme template includes the phrase "Oops! That page can't be found". You can find this string in WPML -> String Translation and add the translation there

0% of people find this useful.

This topic contains 10 replies, has 2 voices.

Last updated by Lauren 1 year, 9 months ago.

Assigned support staff: Lauren.

Author Posts
April 4, 2018 at 11:36 am #1564713

José

Hello,

One more thing:

I've created a 404 page and translated it. But when I test it, only the default portuguese version is being shown. How to guarantee that pt 404 page is shown to pt users and spanish 404 page is shown when someone is navigating the spanish version of the website?

Thank you

April 4, 2018 at 1:19 pm #1564840

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thank you for contacting WPML support. I'll be happy to help you with this.

Could you please tell me, how your 404 page is created? Is it a native WordPress page or a theme template?

If it's a native WordPress page, you need to translate it just like any other page. If the 404 page contains any widgets, you'll need to translate these widgets using the String Translation module.
https://wpml.org/documentation/getting-started-guide/translating-widgets/

If it's a theme template and it's correctly localized, you need to scan the theme for strings in WPML->Theme and plugins translation and then translate the strings in WPML->String Translation.
https://wpml.org/documentation/getting-started-guide/string-translation/

To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. We have an excellent article on how to located here: https://wpml.org/faq/provide-debug-information-faster-support/.

NOTE: Please be sure to check the box to indicate you can provide debug info and paste your debug info in the debug field provided, and NOT in the general response field.

April 16, 2018 at 11:32 am #1644097

José

Hello,

Sorry, I thought I've answer this.
404 page is a wp page built with wp bakery page builder. I then translated content as usual. But only the default portuguese version of the page is being shown. How to guarantee that pt 404 page is shown to pt users and spanish 404 page is shown when someone is navigating the spanish version of the website?

thanks you

April 16, 2018 at 2:55 pm #1648198

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

Thanks for clarifying. Is there a setting in your theme to set the 404 page? If so, it may be that the URL needs to be translated.

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

April 24, 2018 at 1:07 pm #1789757

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

The link you provided does not work for me, Please see attached screenshot.

If needed, you can make a snapshot of your site using the Duplicator plugin: https://wordpress.org/plugins/duplicator/. This will allow me to try and duplicate the error so that I can run further tests without interrupting your live site.

Once the snapshot is complete, either upload the snapshot ZIP file and the installer.php file to a file sharing service such as Dropbox (and share the link in your reply) or right click the Duplicator links in your wp-admin and paste in your reply.

Please note: It is important to reduce the size of the package so please exclude some paths like /cache or /uploads and also exclude archives and media files.

I will also need the username and password of an account that was created BEFORE creating the duplicator package.

I will enable the next reply to be private so only you and I have access to it!

April 24, 2018 at 3:37 pm #1793101

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

The credentials you provided did not allow me authorized access to the site. It may be best for you to make a snapshot and send me the files so that I can duplicate the site locally. I have marked the next reply as private so that you can send updated credentials or files.

April 24, 2018 at 6:12 pm #1795431

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

It looks like your theme has a built in 404 page template. The correct way to translate this would be to translate the strings within this page. For example, the theme template includes the phrase "Oops! That page can't be found". You can find this string in WPML -> String Translation and add the translation there.

If there is a different way in your theme or a plugin you are using to change the built in 404 page, please let me know and I'll be happy to continue troubleshooting.

April 27, 2018 at 4:41 pm #1865475

José

Hello

My problem is not exactly translating the page contents but to show the right language 404 page to the right users. At the moment the 404 page that is shown is always the portuguese one. I need the spanish one to be displayed for users that are navigating the spanish version of the website, the portuguese one for portuguese users and so on.

Thank you

April 30, 2018 at 2:15 pm #1899029

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I am wondering if this issue is happening because you are trying to create a 404 page instead of using your theme's built in 404 page. To test this, please permanently delete the current 404 page that you have created and delete the translation. Then, be sure to clear the cache.

Now, if you go to a page that does not exist in the second language, are you redirected to the built in theme 404 page? And if so, is the URL correct?

May 5, 2018 at 2:58 pm #1991172

José

Hi,

I deleted the page as you asked and got back to the initial theme 404 page. Then the page is correctly shown on both languages.

But how can I have my custom 404 page and still have the page shown in pt and spanish?

Thank you

May 7, 2018 at 1:22 pm #2012709

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

This will require custom code, which unfortunately is outside the scope of our support policy. You could create a child theme and then change the content on the theme 404 page template, and then translate the content using String Translation. If you need additional assistance, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/