PHP conditional language forwarding

Job ID: 31318761

Budget: $10 – $11 USD

I need a code snippet, for a PHP redirection based on Browser language.

Imagine the following English url: mysite.com/en/page.php

Conditional forwarding to PT and CN. IF user's browser language is set to PT or CN, redirect to correct page,

i.e.

Portuguese: mysite.com/pt/page.php

Chinese: mysite.com/cn/page.php

If browser is ANY language except Portuguese and Chinese, stay on original page (no redirection).

Thanks a lot!

IMPORTANT: Freelancer.com is filled with bots. To confirm you've really read the project, please start your bid with the word "Doge". Also, max bid $10, not a cent more.
Related categories: PHP JavaScript HTML Website Build