rails3中的国际化数字(i18n)?

时间:2010-09-08 00:53:27

标签: ruby-on-rails ruby-on-rails-3 localization internationalization yaml

如何在yml文件中使用数字来显示翻译?

f.e:

  # de.yml
  profile:
    hair_colour:
      0: "Blond"
      1: "Dunkelblond"
      2: "Braun"
      3: "Brünett"
      4: "Rot"
      5: "Schwarz"
      6: "Grau/meliert"
      7: "Glatze"
      8: "Andere"

它不起作用......为什么?我该如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

哦^^

修正了:

  # de.yml
  profile:
    hair_colour:
      "0": "Blond"
      "1": "Dunkelblond"
      "2": "Braun"
      "3": "Brünett"
      "4": "Rot"
      "5": "Schwarz"
      "6": "Grau/meliert"
      "7": "Glatze"
      "8": "Andere"