开发者

rails 3 partial depending on locale

开发者 https://www.devze.com 2023-03-03 10:06 出处:网络
I am developing a rails 3 app for 2 locales (:e开发者_StackOverflow社区n, :kr). I have 2 view files:

I am developing a rails 3 app for 2 locales (:e开发者_StackOverflow社区n, :kr).

I have 2 view files:

index.en.html.haml
index.kr.html.haml

And each file uses partial.

_info.en.html.erb
_info.kr.html.erb

(Partials are erb instead of haml)

= render :partial => "info"

This always uses _info.en.html.erb ignoring locale.

Partial can't be auto-selected for locales?

Thanks.


Try

= render :partial => "info"
0

精彩评论

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

关注公众号