Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $currentUrl = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
- if (strpos($currentUrl, "en") != FALSE) {
- // user is english...
- echo "Hello";
- } else if (strpos($currentUrl, "fr") != FALSE) {
- // user is french...
- echo "Bienvenue";
- }
- // you can keep adding else-if statements for other languages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement