question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request: getBrowserLanguage public

See original GitHub issue

I’m submitting a…

[ ] bug report
[x ] feature request
[ ] support request

I would like to use the return value of this method when user have not defined his language or when he wants to set his language automatically. Or if possible when setting current language with a null value, use automatically the browser value.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
robisim74commented, Aug 27, 2017

The getBrowserLanguage method is public in the new major version 4.0.0 for Angular v5. Greetings

1reaction
robisim74commented, Jul 31, 2017

@johaven About your requests:

  • When setting current language with a null value, use automatically the browser value: I prefer to keep setCurrentLanguage method as it is, with a not nullable parameter
  • Make getBrowserLanguage public: ok, that’s possible. In the meantime, you have to implement your own method
Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript for detecting browser language preference [duplicate]
NET MVC and you want to get the Accepted-Languages header from JavaScript then here is a workaround example that does not involve any...
Read more >
Solved: How to Detect a User's Locale in a Web App | Phrase
In this article, we'll go through three different ways of detecting a user's locale: through the browser's navigator.language s (on the client) ...
Read more >
Navigator.language - Web APIs | MDN
The Navigator.language read-only property returns a string representing the preferred language of the user, usually the language of the ...
Read more >
Setting language preferences in a browser - W3C
Run the Internationalization Checker on any page, then in the Information panel, look under Request Headers > Accept-Language . See an example ...
Read more >
Howto detect browser language - MSDN - Microsoft
ASP.NET 2.0 Support Auto Detection of Browser Language - you can determine the language of the requesting browser from user's culture. http://quickstarts.asp.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found