简体   繁体   中英

Writing i18n(internationalization) yml file in Ruby on Rails

I'm writing i18n's yml file and I have a question. I had written like this->

ja.yml

ja:
  users:
    show:
      index: (Japanese word inside here)

but I need to write word 'index' in edit page.

so I had changed like this

ja:
  users:
    show:
      index: (Japanese word inside here)
    edit:
      index: (Japanese word inside here)

word index has been overlapped, but I don't know is this right way to use i18n..

YAML supports some kind of variables like this

ja:
  users:
    show:
      index: &index (Japanese word inside here)
    edit:
      index: *index

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM