This site was created as a part of a talk for the July 2010 meeting of Austin on Rails. It serves as a case study to explore localization and internationalization using Rails 3.
Slides for the presentation are available at http://www.slideshare.net/matttthompson/i18n-and-l10n-with-rails-3
Check it out at: http://zelig-st-groceries.heroku.com/
Try changing the locale by adding
[?locale=fr]((http://zelig-st-groceries.heroku.com?locale=fr) to the end of the URL.
git clone git://github.com/mattt/Rails-I18n-Example.git zelig-st-groceries
rake db:migrate db:seed
- Open localhost:3000 in your browser
You can change the locale of the application by setting one of the following:
localeParameter: (eg localhost:3000?locale=ja)
- Top-Level Domain*: (eg ja.localhost:3000)
- Subdomain*: (eg localhost.jp:3000)
Add the following at the end of
127.0.0.1 en.localhost 127.0.0.1 ja.localhost 127.0.0.1 fr.localhost 127.0.0.1 localhost.jp 127.0.0.1 localhost.fr
Zelig St. Groceries is licensed under the MIT License:
Copyright (c) 2010 Mattt Thompson (http://mattt.me/)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.