Setting a User’s Locale Based upon Domain Name In Rails by mendable — 18 June 2009 Learn how to set a visitor’s locale based upon the domain name of your website. Comments Wouldn’t it make more sense to just use a Hash? LANGS = Hash.new { |h, k| k }.update('com' => 'en', 'uk' => 'en') judofyr — 19 June 2009 Why does that make more sense than using an array? mendable — 20 June 2009 Post a comment You can use basic HTML markup (e.g. <a>) or Markdown. Authenticate with GitHub As you are not logged in, you will bedirected via GitHub to signup or sign in
Comments
Wouldn’t it make more sense to just use a Hash?
LANGS = Hash.new { |h, k| k }.update('com' => 'en', 'uk' => 'en')Why does that make more sense than using an array?
Post a comment