leapcode/leap_web — pull request #131 by elijh (2013-12-22 10:30:46+00:00)
Title: locale prefix support

this branch makes localization better by honoring the browser's desired language. for several reasons, it also introduces a system where any non-default locale is encoded as a prefix in the url. this has a couple benefits, but will be especially useful in the near future when we need to add more static pages (for help, privacy policy, terms of service, contact, etc). these pages are required by braintree in order to sign up for a real account.

* set locale based on request header
* enforce locale path prefix when current locale is not the default
* note: don't use root_path anymore, instead use home_path