How do you structure i18n yaml files in Rails?

后端 未结 6 1322
春和景丽
春和景丽 2020-12-07 12:08

I started populating an en yaml file in Rails and I can already tell it will get messy and out of hand before too long. Is there a convention to keeping this file organized?

6条回答
  •  旧巷少年郎
    2020-12-07 12:55

    Editing directly the yaml files leads to messy and unreadable files.
    Moreover, it'll be difficult for you to provide access to translators if, someday, you want a non-developer to add a new language.

    I would recommend using localeapp, which generates a single yaml file.
    But allows you to easily see and manage your translations in a web interface.
    And to create additional access to translators.

提交回复
热议问题