Skip to content

Commit

Permalink
translating
Browse files Browse the repository at this point in the history
# Translating the Application

A lot of Hoboists are foreign, so let's translate our application so they feel at home.

First we'll make a couple of temporary tweaks to our `config/environment.rb` file.

SHOW_PATCH

The first tweak changes the default locale to French.  Normally you want to set the locale dynamically, perhaps based on the domain name.   However, that's outside the scope of this tutorial.   See [the Rails guide to i18n](http://guides.rubyonrails.org/i18n.html) for more information.

The second tweak sets the `HOBO_VERSBOSE_TRANSLATIONS` flag.  This causes the Hobo translater to log whenever it does a translation.   This lets you determine the translation keys that it is looking up.
  • Loading branch information
bryanlarsen committed Feb 19, 2010
1 parent 585d987 commit 4f389e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/environment.rb
Expand Up @@ -41,9 +41,11 @@

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de
config.i18n.default_locale = :fr
end

HOBO_VERBOSE_TRANSLATIONS = true

#ActionMailer::Base.delivery_method = :smtp
#ActionMailer::Base.smtp_settings = {
# :address => "smtp.example.com",
Expand Down

0 comments on commit 4f389e0

Please sign in to comment.