Refactoring Ruby on Rails i18n YAML files using dictionaries

后端 未结 4 1529
长发绾君心
长发绾君心 2020-12-08 14:55

This StackOverflow question gave me food for thought on what is a good structure for Rails i18n files, so I thought I\'d share another structure for refactoring Rails i18n y

4条回答
  •  抹茶落季
    2020-12-08 15:36

    I just released a gem called dry_i18n: https://rubygems.org/gems/dry_i18n

    I created this gem in order to solve the issue you ask for. With this gem you'll be able to even reuse keys with interpolations and nest them.

    I hope it is useful.

提交回复
热议问题