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

Browser language strings are - versus _ #4

Open
digitalrinaldo opened this issue Sep 14, 2012 · 3 comments
Open

Browser language strings are - versus _ #4

digitalrinaldo opened this issue Sep 14, 2012 · 3 comments

Comments

@digitalrinaldo
Copy link

I was just wondering is there is an option for mapping en_US to en-US the browsers ask for locales using a "-" instead of an "_" and thanks for the useful library.

@aseemk
Copy link

aseemk commented Aug 1, 2013

+1. I'd actually love any insight/clarity into when to choose - vs. _.

@stuartf
Copy link
Collaborator

stuartf commented Oct 17, 2013

The - format used in HTTP is defined in RFC 2616 Section 3.10 and the _ format is used on Posix (linux, unix, OSX) though I'm currently unable to find the spec that defines it.

@danielesegato
Copy link

Locale objects currently have fields:

  • code: as-is string of the locale, as received
  • normalized: language lower case, underscore, country upper case, es: en_US

wouldn't it be enough to add a browserized param with language lower case, dash, country lower case? (es. en-us)

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

4 participants