5

Are there naming conventions I can follow when writing an i18n yaml file for my Rails app?

I have a "Save changes" button that corresponds to Users.update. I'm not sure what to call the key:

users.edit.update
users.edit.update_button
users.edit.save_changes
users.edit.btn_update

Are there any naming conventions I can follow?

Mohamad
  • 34,731
  • 32
  • 140
  • 219
  • 2
    See example http://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/en.yml Using `User.update` as key also possible (and `users.edit.update` too). – Ivan Black Mar 15 '14 at 16:20
  • 1
    Possible duplicate of [What is the canonical YAML naming style](https://stackoverflow.com/questions/22771226/what-is-the-canonical-yaml-naming-style) – hazzik Jun 07 '17 at 22:32

1 Answers1

3

There is no set convention. You should choose the most natural approach for your application and your programming language.

L. G.
  • 9,642
  • 7
  • 56
  • 78
cristi_razvi
  • 764
  • 1
  • 6
  • 16