jcasimir / locale_setter

A simple library to set request locale based on a hierarchy of factors
MIT License
118 stars 18 forks source link

Domain based config #7

Closed somebody32 closed 11 years ago

somebody32 commented 11 years ago

Hi,

I've added opportunity to specify locale per domain or subdomain. Just specify config hash like this:

LocaleSetter::Domain.localized_domains = {
  "en.domain.com" => :en,
  "es.domain.com" => :es
}

and all should work as expected.

Also cleaned up dummy app a little bit and updated gitignore

steveklabnik commented 11 years ago

Thanks for this! Overall, pretty good. Let's just address these few comments and I'm good to merge.

somebody32 commented 11 years ago

Thanks for reviewing, I've made the changes

somebody32 commented 11 years ago

I've got rid of shoulds for the whole spec file

steveklabnik commented 11 years ago

Thanks! :D