I store my English website pages in a folder called “en”. Then I store the Arabic version of the website pages in a folder called “ar”. Both folders are still in local environment (localhost).
In each English website page, there is a button to go to the Arabic version of the page.
Here is the button code in the English web page (using href=”echo $_SERVER[‘PHP_SELF’]”):
But instead of going to the Arabic version of the web page, the button redirects me to the page itself. The link becomes:
http://localhost/the_website/en/the_page.php
What I want:
http://localhost/the_website/ar/the_page.php
How can I do that?
You will need to replace the en with ar