0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Pass default values to prevent translation missing in Rails | i18n

Last updated at Posted at 2019-04-16

default: just need to pass default: .

Example:

 I18n.t('activerecord.attributes.cleature.today', default: 'カエル') 

in this case.

If defined in YAML, its value is returned. If there is no definition, the カエル will return.

environment

  • Rails 4.2.6

Original by

Rails | i18n で translation missing を防ぐデフォルト値を渡す

About

About this translattion

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?