html - Ruby localization -


i have localize web site, done, except have ran 2 problems. code below small input form, strings? there label text field , button. secondly, receiving error:

"undefined method `-' "translation missing: lv.date.order":string". 

where have create translation? in .yml file? if so, how? in advance!

<%= form_for([:admin, @publisher]) |f| %>   <% if @publisher.errors.any? %>     <div id="error_explanation">       <h2><%= pluralize(@publisher.errors.count, t(:error)) %> <%=t(:prohibited_saved)%></h2>        <ul>       <% @publisher.errors.full_messages.each |msg| %>         <li><%= msg %></li>       <% end %>       </ul>     </div>   <% end %>    <div class="field">     <%= f.label :name %><br />     <%= f.text_field :name %>   </div>   <div class="actions">     <%= f.submit  %>   </div> <% end %> 

this error means rails cannot find translation date.order in current locale file.

you should have lv.yml file inside config/locales content:

lv:   date:     order:     - :day     - :month     - :year 

it instruct rails show dates in format: day/month/year


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -