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

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 thread is resolved. Here is a description of the problem and solution.

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

Solution:
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:

<?php
   header( 'Location: http://yoursite.com/it/' ) ;
?>

0% of people find this useful.

Tagged: 

This topic contains 3 replies, has 3 voices.

Last updated by kevinS-10 3 years, 6 months ago.

Assigned support staff: Shekhar Bhandari.

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

tomasS-14

Hello,

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
Supporter

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

<?php
   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.

Thanks

June 3, 2016 at 8:49 am #896293

tomasS-14

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

kevinS-10

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