root :to => 'welcome#index'

is enough

Am Dienstag, 13. November 2012 15:37:06 UTC+1 schrieb Werner:
>
> Hallo Erwin.. 
>
> When you work with
>
> 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
>
> just create 
>
> index.html.erb
> index.en.html.erb
>
> ect..
>
>
> Gruss
>
>
>
>
> Am Dienstag, 13. November 2012 15:31:16 UTC+1 schrieb Erwin:
>>
>> I have set 
>>
>>  match '/:locale' => "welcome#home",  :as => :root
>>
>> but it doesn't cover the default case, when user enter the domain url wo 
>> locale, http://www.myapp.com
>>
>> Is there any way to default it to the app default locale   I18n.locale ??
>>
>> thanks for feedback 
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/X6C8Cs2rE-4J.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to