Hello, In a rails application, I have a static welcome page and I want to translate my website. I think to use I18n for this is an uggly solution because there is a lot of html. I don''t find a good solution for globalize3 and activeadmin. Is there a better solution? Thank You! -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Guirec Corbel ha scritto:> Hello, > > In a rails application, I have a static welcome page and I want to > translate my website. I think to use I18n for this is an uggly solution > because there is a lot of html. I don''t find a good solution for > globalize3 and activeadmin.This is the gem you''re looking for: https://github.com/stefanoverna/activeadmin-globalize3 I use it with this other gem to use wysihtml5: https://github.com/stefanoverna/activeadmin-wysihtml5 -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Le 2013-01-19 14:51, Tommaso Visconti a écrit :> Guirec Corbel ha scritto: >> Hello, >> >> In a rails application, I have a static welcome page and I want to >> translate my website. I think to use I18n for this is an uggly solution >> because there is a lot of html. I don''t find a good solution for >> globalize3 and activeadmin. > > This is the gem you''re looking for: > https://github.com/stefanoverna/activeadmin-globalize3 > > I use it with this other gem to use wysihtml5: > https://github.com/stefanoverna/activeadmin-wysihtml5 >I tried it but I have this : |undefined method `translated_inputs'' for #<ActiveAdmin::FormBuilder:0x000000056dd2d8> There is no better solution? | -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
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.
Am Samstag, 19. Januar 2013 20:11:13 UTC+1 schrieb Guirec
Corbel:>
> Hello,
>
> In a rails application, I have a static welcome page and I want to
> translate my website. I think to use I18n for this is an uggly solution
> because there is a lot of html. I don''t find a good solution for
> globalize3 and activeadmin.
>
> Is there a better solution?
>
> Thank You!
>
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/k8-AtfWH-f4J.
For more options, visit https://groups.google.com/groups/opt_out.