ruby-gettext / gettext

Gettext gem is a pure Ruby Localization(L10n) library and tool which is modeled after the GNU gettext package.
https://ruby-gettext.github.io/
69 stars 28 forks source link

Dasherized Locales per RFC4646 #79

Closed ajrkerr closed 4 years ago

ajrkerr commented 4 years ago

I'm working on a translation pipeline for an application, and I've had to write some tooling to convert between the Underscored vs. Dashed locales (e.g. en_US vs. en-US) in order to support some downstream tooling.

I did a bit of digging, and it looks like RFC4646 specifies the use of dashes, and does not included _.

I don't mind putting together a PR to add support for dasherized locale names, however wanted to double check that this would be accepted before doing the work.

Thanks!

ajrkerr commented 4 years ago

Nevermind, I can see that this is likely an inherited decision from the gettext utillty: https://www.gnu.org/software/gettext/manual/html_node/Locale-Names.html