A
A
Askhat2016-05-12 08:22:04
Internationalization and localization
Askhat, 2016-05-12 08:22:04

There are two language versions of the site example.com and example.com/ru. What is the easiest way to display a site depending on the region (en / ru)?

I read "Localization of the site interface using PHP, Smarty and Gettext", but maybe there are easier options?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DarkMatter, 2016-05-12
@darkmatter

In the browser, the language is passed to $_SERVER in HTTP_USER_AGENT - read it, parse it and redirect it to the required version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question