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 1 reply, has 2 voices.

Last updated by Rajeeb Banstola 3 months ago.

Assigned support staff: Rajeeb Banstola.

Author Posts
July 18, 2019 at 8:09 pm #4242209

triciaJ

I am trying to: Append the default country code to my url for posts only. Example,

arrivein.com/ca-en/post-1-hello (default)
arrivein.com/in-en/post-1-hello

Link to a page where the issue can be seen:

I expected to see: arrivein.com/ca-en/post-1-hello

Instead, I got:

arrivein.com/post-1-hello (default)

July 18, 2019 at 9:34 pm #4242455

Rajeeb Banstola

Hi,

Thank you for contacting WPML!

You can easily add the default language's code to the all permalinks by following the below instructions:

1. Go to WPML - Languages
2. Scroll down to Language URL Format
3. After selecting "Different languages in directories" option, you will see another option to "Use directory for default language". Enable it.
4. Setup a page for root url.

More information on this can be viewed on the link below:

https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/

Please note that this will add the default language code to all URLs in your site. If you need to add the code to post only, you would have write code to modify the current behavior.

Unfortunately, that is outside the scope of the support. If you need the feature, I suggest you to look into our WPML contractors who are proficient with WPML and addons:

https://wpml.org/contractors/

Let me know if you have any other questions.

Best,