开发者

Translation string does not work?

开发者 https://www.devze.com 2023-02-07 01:02 出处:网络
I use rails 2.3.5 and have in my locale file this line: more_in_category: \"Mehr aus der Kategorie \'{{category}}\'\"

I use rails 2.3.5 and have in my locale file this line:

more_in_category: "Mehr aus der Kategorie '{{category}}'"

and in my view:

<%= t 'more_i开发者_运维问答n_category', :category=>@topic_category.title %>

On production everything works fine. The String is replaced with the content of the category title, but on my local/development the category is not replaced. It prints out the some like I wrote in the locale file.

"Mehr aus der Kategorie '{{category}}'"

any ideas what I miss?


Just guessing here. Have you tried this:

more_in_category: "Mehr aus der Kategorie %{category}"


You got a newer version of Ruby in your development environment. If you use Rails version 2.3.8 or less then you can't use Ruby 1.9.

Edit:

You could try to use %{...} instead of {{...}}

0

精彩评论

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