【发布时间】:2016-04-23 16:16:30
【问题描述】:
现在我得到了适用于两种语言的 Rails 应用程序。英俄。
但应用程序现在不代表 url 中的语言:example.com/posts 用于 eng 和 rus,但我需要 example.com/ru/posts 和常规的英文版 example.com/posts
我该怎么做?
路由文件:
root 'static_pages#home'
get 'about' => 'static_pages#about'
get 'contact' => 'static_pages#contact'
get '/change_locale/:locale', to: 'settings#change_locale', as: :change_locale
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-4 routes internationalization