开发者

Rails app in different language?

I want to create my app using spanish controllers/methods.

can I use scaffold?

scaffold created methods like new, crea开发者_运维问答te, edit, etc

I want to change those to be nueva, crear, editar, etc

when I do that the app breaks because of REST routing rules

whats my best approach to this? please help.


Just customize the resources on routes.rb by using :path_names.


Why not keep English method names and use localized URLs instead? A lot of things in Rails depend on naming conventions, it's going to be unpractically expensive to change them.

When changing just URLs the routes.rb is the only module affected. If you change method names, you need to adjust routes, controllers and replace auto-generated URL helpers with hand-written ones.


You are better off coding your app using english names for everything and then just translate what the user will see: i.e., use Rails i18n for translating your views. As for routes, this plugin works just fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜