Get language other than current #153
Unanswered
carstensbix
asked this question in
Q&A
Replies: 1 comment
-
This package has no way to know the language based on the IP address. But it can detect it based on the Accept-Language header which comes from the user browser based on the user system's language, which is better than detect it based on IP in my opinion (you could speak one language but live in a country with another one). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm developing a top bar above my website's header, similar to the one on apple.com. This bar will notify users if the displayed language differs from the region indicated by their IP address, offering them an option to switch. However, I want the top bar to appear in one specific language (based on IP address) while the rest of the page remains in the current language.
How can I implement this? Is there a straightforward function or hook like getLanguageFiles(langcode) to achieve this?
Beta Was this translation helpful? Give feedback.
All reactions