This thread is resolved. Here is a description of the problem and solution.
Problem:
You are developing a site and want to change the language URL format to include country codes like /ca/fr/ and /us/en/ instead of the default format like /fr-ca/ and /en-us/. You tried modifying the
REQUEST_URI
in an init hook but were unable to modify the permalink to achieve the desired URL format.
Solution:
Currently, we do not support the specific configuration you are asking for to include country codes in the language URL format. We are continuously working to enhance our features, and if we introduce more options for the URL format in the future, we will announce it through a blog post on our site. You can check for updates and related information on our blog.
If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our 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.