1

I am using ruby 1.8.7 and i18n gem version 0.4.2 , In view page i have used

<h4><b><%= " #{t('date')} </b>:"%></h4>

and at en.yml

en: # locale
  net: "Net"
  amount_paid: "Paid Amount"
  date: "Date"

when i executed I got this

snapshot

Why I am not getting the exact translation

Sanju B Myh
  • 271
  • 1
  • 15

1 Answers1

1

If you have a look here, the Rails-i18n already has a date key defined that is overriding your definition. Try to change your date key or nested under another key:

en: # locale
  general:
   net: "Net"
   amount_paid: "Paid Amount"
   date: "Date"

Also note that the "#{}" in your view are not necessary:

<h4><b><%= t('general.date') </b>:"%></h4>
AbM
  • 7,326
  • 2
  • 25
  • 28