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

How to use the language code in the default language URL too.

1. Go to WPML -> Languages
2. Go to Language URL format
3. Choose "Different languages in directories"
4. Check the "Use directory for default language" checkbox
5. On "What to show for the root URL" select "HTML file"
6. On the HTML file name field insert "lang.php"
7. Now go to your site root folder through FTP and create a new file named lang.php
8. In the lang.php file please paste the following code:

   header( 'Location:' ) ;

0% of people find this useful.

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 3 replies, has 3 voices.

Last updated by Keviin Cosmos 4 years, 1 month ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
June 2, 2016 at 10:52 am #895554



I am trying to: set url tag active for default language that it would be showed all the time.

Currently website is on domain: hidden link I would like it to be displayed like hidden link and so on. Default language is Lithuanian so url tag is - lt.

As I understand I need to use option: Language Directory for the Default Language. If so could you please guide me how to do it in details?

If no how to make default language url tag active all time?

P.S. I am using Avada theme Version 4.0.2 and WPML Multilingual CMS Version 3.3.8

Thank you in advance!

June 3, 2016 at 4:50 am #896123

Shekhar Bhandari

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hi there,

Thank you for contacting WPML support.

Could you please follow the steps to fix the issue:
1) Go to WPML -> Languages
2) Go to Language URL format
3) Choose "Different languages in directories "
4) Check the "Use directory for default language" checkbox
5) On What to show for the root url: check "HTML file "
6) On the html file name field insert lang.php
7) Now go to your site root folder through ftp and create a new file name lang.php
8) In the lang.php please paste the following code

   header( 'Location: <em><u>hidden link</u></em>' ) ;

Please let me know if the above solution works for you, I look forward to your reply.


June 3, 2016 at 8:49 am #896293


Hello Shekhar,

it worked perfectly! Thank you! These guides was exactly what I needed.

Have a nice day.

July 18, 2019 at 7:24 am #4235651

Keviin Cosmos

This does not work anymore.. Do you have an updated solution? 🙂