Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Language Culture Name #293

Closed
thorsten opened this issue Oct 31, 2016 · 3 comments
Closed

Added support for Language Culture Name #293

thorsten opened this issue Oct 31, 2016 · 3 comments

Comments

@thorsten
Copy link
Contributor

I'm submitting a ...

[ ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[x] feature request

Current behavior
getBrowserLang() returns just the language code, e.g. "de" or "en". In our current project there's the need to use the language culture name, e.g. "de-DE" or "en-US".

Expected/desired behavior
Add a new function getBrowserCultureLang(), that returns the language culture name, e.g. "de-DE"

What is the motivation / use case for changing the behavior?
The need in a project for this feature.

Please tell us about your environment:

  • ng2-translate version: 3.1.0

  • Angular version: 2.1.0

  • Browser: all

  • Language: all

@chpasha
Copy link

chpasha commented Nov 2, 2016

the methods getBrowserLang and getBrowserCultureLang have 99% same code or do I miss anything? getBrowserLang should actually reuse getBrowserCultureLang and split result with - or _

@thorsten
Copy link
Contributor Author

thorsten commented Nov 2, 2016

Yes, you are right. Good hint. @ocombe, should I add another PR with this improvement?

@ocombe
Copy link
Member

ocombe commented Nov 2, 2016

yes please :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants