Hacker News new | ask | show | jobs
by midas007 4474 days ago
I'm working on locale stuff for a Rails app right now (just updated the i18n_data in fact).

The assumption will be that country is mostly orthognal to language b/c people are übermobile. Further, that the dialect of the language should not force assumptions of other preferences... only autodiscover initial settings as close to desired as possible. (Fuck, why isn't there a standard for this common, hard-to-manage shit the OS already knows.)

i18n is taking up tons of time to get (mostly) right, but I believe it's one of those things not to botch because it's such a huge signal to everything else about your app.

If I want to be the most obscure hipster paying in Lesotho Loti, read Catalonian, have a "," for thousands separator and use UTC tz, by Flying Spaghetti Monster that's what it's gonna allow.

1 comments

Interesting, thanks.

Current Gemfile:

  # ...

  # i18n
  gem 'rails_locale_detection' # consider locale_setter
  gem 'rails-i18n', github: 'steakknife/rails-i18n'
  gem 'i18n_data', github: 'steakknife/i18n_data'
  gem 'countries_and_languages', require: 'countries_and_languages/rails'
  gem 'country_select' # for simple_form

  # tz
  gem 'tzinfo-data', '>= 1.2014.1'
  gem 'tzinfo'

  # symbols and images
  gem 'svg-flags-rails'

  # idn
  gem 'resolv-idn'   # resolv unicode patch
  gem 'idn-ruby'     # unicode IDNA domain resolution
  # ...

  # ...