This thread is resolved. Here is a description of the problem and solution.
Problem:
The client wants to translate custom post type (CPT) slugs without using WPML's String Translation, aiming for a cleaner approach while maintaining language-specific URLs (e.g., English: example.com/en/products/, German: example.com/produkte/). They are experiencing issues with 404 errors and incorrect language detection in requests.
Solution:
We recommend using WPML's String Translation for translating CPT slugs as it is a mandatory plugin for such functionality. Ensure that the 'has_archive' is set to true in your code, as shown below:
'has_archive' => true,
WPML supports custom slug translation when the custom type is registered but does not support custom permalink structures. For more details, please refer to our documentation on translating slugs for custom post type archives.
If you require a custom solution, we suggest using the services of WPML contractors, which can be found here: WPML contractors.
Please note that this solution might be outdated or not applicable to your specific 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 issue persists, 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.