Nerian / bootstrap-datepicker-rails

A Datepicker for Twitter Bootstrap, integrated with Rails assets pipeline
MIT License
649 stars 182 forks source link

pick up <html lang="..."> attribute before defaulting to English #108

Closed HuBandiT closed 9 years ago

HuBandiT commented 9 years ago

I would like to suggest the following language precedence order:

  1. language from data-date-language attribute
  2. language from .datepicker() call argument
  3. language from <html lang="..."> attribute
  4. English

If the language determined by this preference list is not loaded/available, then also fall back to English.

For one case of of why/where this would be useful:

https://groups.google.com/forum/#!searchin/hobousers/datepicker/hobousers/0eBz-C9Plr8/sPevKOYust8J

HuBandiT commented 9 years ago

I also posted this upstream: https://github.com/eternicode/bootstrap-datepicker/issues/1552

Nerian commented 9 years ago

Sounds fine to me. If it gets changed in the upstream repo it will be changed here too.

HuBandiT commented 9 years ago

so are you saying I should leave this open as a reminder, or should I close it?

Nerian commented 9 years ago

You can close it now that the discussion is happening in the other repo.