Rails 3 translate from errors

Hi I'm using the simple_form GEM. I'm also translating form labels, that is working fine, so 'Name' becomes 'Navn'

But my form error message displays it as 'Name'

Any clue about what's happening?

--EDIT-- I found out that i had to do the following in my translation file:

da:
    activerecord:
        models:
          brand: 'brand'
          user: 'bruger'
        attributes:
          brand:
            name: 'Navn'
          user:
            name: 'Navn'

I hope some other will find this info usefull.

Answers


da:
activerecord:
    models:
      brand: 'brand'
      user: 'bruger'
    attributes:
      brand:
        name: 'Navn'
      user:
        name: 'Navn'

Need Your Help

php file_get_contents cannot read xml service

php xml file-get-contents

I want to read and parse the xml data from an url.My url is:"http://xml.gamebookers.com/sports/bandy.xml".I can access xml data from browser.However,when i attempt to read it by using php it doesnt

CSS alignment: left and right issue

css html alignment

I'm expecting to get all text aligned right, although Support  |  Profile  |  Logout is aligned left, while Welcome is aligned right. Why does it happen?