Hi
1.
class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :set_locale
def set_locale
# update sessions if passed
session[:locale] = params[:locale] if params[:locale]
# set locale based on sessions or default
I18n.locale = session[:locale] || I18n.default_locale
end
end
2. create a
index.html.erb
and a translated index.de.html.erb
the 'de' is the language code. so take what you need: en fr it etc.