-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Translate routes #38
Comments
Maybe this gem? |
The config/router.rb# from
resources :events, only: :show
# to
localized do
resources :events, only: :show
end rake routes
But the routes |
But... I remembered... exists posts using |
Why localize the routes? # config/routes.rb
scope "/:locale" do
resources :events
end This way it's possible to access the localized page by: |
@lcguida improvement for a better seo... |
Maybe use an initializer to hide locales RouteTranslator.config do |config|
config.hide_locale = true
end |
And.. to fix routes in tests. RouteTranslator.config do |config|
config.hide_locale = true
config.generate_unlocalized_routes = true if Rails.env.test?
end |
Manually?
Output...
Or use gem?
The text was updated successfully, but these errors were encountered: