A
A
anastasion2020-07-14 02:10:03
Internationalization and localization
anastasion, 2020-07-14 02:10:03

Site localization plugin?

There is a site with two language versions: Russian and Czech. The site was translated from Russian into Czech using the TranslatePress - Multilingual plugin. It is

necessary to make sure that everyone who comes from the Czech Republic automatically sees the Czech version, otherwise, when automatically translated into Google Chrome, all styles fly.

Can someone suggest how this can be implemented? The multilingual plugin has a paid version with automatic ip detection, but can it be done differently?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
granty, 2020-07-14
@granty

Language detection by IP does not work fully, because IP determines the visitor's location (country) more than his language preferences.
For example, 20% of the Russian-speaking population lives in Israel, and by IP you will show them a website in Hebrew.
IP detection is suitable for displaying region-specific advertising (it also messes up on VPNs). The user's preferred language(s) is passed by the browser in the Accept-Language
HTTP header , since everyone chooses their preferred language in the browser's locale settings. On Habré, there is an article on this topic Competent detection of the user 's language with an example code in PHP. The rest can be googled.

D
Dima, 2020-07-14
Dolgoter @SpiderPigAndCat

put WPML there everything is provided. but if you don’t want to, then track the country by ip and switch to the desired language version

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question