Tagged: wpml language switching
I might be asking a WP question here, but in the theme’s header.php there is a section for the languages.
I have WPML structuring the different languages in directory format, and no longer in ?lang= format.
When I used the top bar to switch languages with the ?lang format, it change the language, and stayed on the same page, which is what I wanted.
I do not know how to achieve the same with the /en/ format of url’s. How do I switch language while staying on the same page ?
brings the right language, but always the home-page
Try to use the following code
<li><a href="<?php echo '/fr' . $_SERVER["REQUEST_URI"] ?>">FR</a></li>
<li><a href="<?php echo '/nl' . $_SERVER["REQUEST_URI"] ?>">NL</a></li>
You must be logged in to reply to this topic.Log in/Sign up
One standard license is valid only for 1 project. Running multiple projects on a single license is a copyright violation.
The message was successfully sent
Your shopping cart is empty
You may extend support period on ThemeForest and then update its status by clicking "Update" button in your Account area.