I
I
Ilya2019-03-30 18:58:03
JavaScript
Ilya, 2019-03-30 18:58:03

How to spin a redirect to Api Yandex maps?

Hello! Please tell me what I'm doing wrong in the code. I screwed the Yandex maps api to determine the user's country so that it shows him the desired language. Something doesn't work. I'm not good with languages, maybe I spelled something wrong?5c9f93c63def3515545053.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexalexes, 2019-03-30
@ilyga

To determine the language used on the client side of the site, it is enough to analyze the window.navigator properties.
How to determine the user's browser language?
PS:
header('loacation ') - you can't use this in JS, it's PHP.
In JS, the same behavior is triggered by changing the window.location.href property

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question