florrain / locale

Browser locale negotiation for node.js
MIT License
257 stars 36 forks source link

Return original locale code on serialize #23

Closed mlmorg closed 10 years ago

mlmorg commented 10 years ago

When I pass in a supported set of locale codes to best(), the string version of that locale code is always separated with a _. I assumed it would return the original supported locale code string.

For example, the current implementation is this:

var locales = new locale.Locales(['en_US']);
var supported = new locale.Locales(['en-US']);
locales.best(supported).toString(); // en_US

This altered implementation now returns the correct en-US code — which is what I specified in the list of supported languages.

mlmorg commented 10 years ago

bump

jed commented 10 years ago

thanks, @mlmorg.

mlmorg commented 10 years ago

Thanks @jed, do you plan on publishing a new version?

jed commented 10 years ago

already did!

On Mon, Jul 7, 2014 at 3:19 PM, Matt Morgan notifications@github.com wrote:

Thanks @jed https://github.com/jed, do you plan on publishing a new version?

— Reply to this email directly or view it on GitHub https://github.com/jed/locale/pull/23#issuecomment-48227778.

mlmorg commented 10 years ago

Missed it sorry! Thanks!