A
A
Alexander Kerzakov2015-12-07 00:45:42
PHP
Alexander Kerzakov, 2015-12-07 00:45:42

How to determine the user's language and redirect him to the correct version of the site?

There is a site, let's say example.com
Presented in 4 languages:
example.com/ru/- Russian.
example.com/en - English.
example.com/es - Spanish.
example.com/de - German.
How to redirect the user using php, through the index.php file, depending on what language he has?
Is there a ready solution? And then in PHP it's not a boom boom.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2015-12-07
@PabloRosi

www.w3.org/International/questions/qa-accept-lang-...

D
dom1n1k, 2015-12-07
@dom1n1k

How to determine the language and kick the user off is not a question.
Here's how to make it so that from any page of the site you can go to its copy in another language - this is a more interesting question. And in case of absence, report it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question