how to use rails i18n fallback features

后端 未结 6 1642
难免孤独
难免孤独 2020-12-03 13:02

I have this i18n problem

activerecord:
  notices:
    messages:
      success: 
        create: \"Something was created\"
    models:
      user:
        suc         


        
6条回答
  •  鱼传尺愫
    2020-12-03 14:03

    When a :default option is given, its value will be returned if the translation is missing:

    I18n.t :missing, :default => 'Not here'
    # => 'Not here'
    

    More info here

提交回复
热议问题