H
H
HaruAtari2014-01-05 11:15:27
Yii
HaruAtari, 2014-01-05 11:15:27

Is it possible to rely on the Accept-Language value when building the localization of a site?

Good morning.
I am developing a website that was originally focused on the Russian-speaking segment of the Internet. But something went wrong and the vast majority of visitors are from English-speaking countries. So I'm thinking about localization.
The content itself does not require translation. You only need to translate the interface. In Yii, this is done easily and naturally. But the question arose, how to determine which language to issue to the user?
At first I wanted to determine the language by subdomain: ru.site.com, en.site.com. But the site is still very small and I don’t want to bring back a whole system of subdomains for this. Passing the language through the get parameter is also not suitable.
I think if you determine the system language by the titleAccept-Language. Will it be reliable? And is it right to issue different content (in different languages) at the same address.
And how will the search engines react to this?
I would be grateful if you share your experience.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nazar Mokrinsky, 2014-01-05
@nazarpc

Determine by Accept-Language - this is one of the most reliable ways, as it matches the browser's language. But then you need to give the opportunity to switch the language if the user wants it.

S
Sergey Lerg, 2014-01-05
@Lerg

Each language must have its own URL.
site.com/topic site.com/ru/topic
Accept-Language can be determined. Just use the correct function for this, taking into account the q parameter.
You can also determine by Geo IP, but in most cases this is not necessary.

M
Maximus43, 2014-01-05
@Maximus43

habrahabr.ru/company/ruvpn/blog/183060

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question