radar / humanize

Takes your numbers and makes them *fancy*.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discussion: Shouldn't we Use I18n.locale by default?

danielolivaresd opened this issue · comments

Maybe I'm missing something here, but I think that it would be useful if #humanize would use current locale (I18n.locale) by default when available.

One could still change to a different locale on a per-call basis by doing something like:

# the current way
n.humanize(locale: :es)

# or
I18n.with_locale(:es) do
  n.humanize
end

, but I think that if your app/project has I18n, you'll probably want to use the current locale for humanizing numbers most of the times.

If it makes sense, I'd be happy to find some time to submit a PR with a proposal in the next couple of weeks.

This library has no dependency on i18n and never will.

I understand. Thanks.