ActiveRecordã®enumã«I18nç¨ã®æ©è½ãæä¾ããgemãã¤ãã£ãã https://github.com/r7kamura/activerecord-enum_translation ã©ããããã®ã Userãenumãå©ç¨ããstatusã¨ããã«ã©ã ãæã£ã¦ããã¨ããã¨ãI18nç¨ã®è¾æ¸ã¨ãã¦ãããã風ãªãã¼ã¿ãç¨æãã¦ããã°â¦ ja: activerecord: attributes: user: name: åå status: active: å©ç¨ä¸ inactive: åæ¢ä¸ 次ã®ããã«ã¡ã½ãããå¼ã³åºããã¨ã§ã翻訳ãããè¾æ¸ãå©ç¨ã§ããããã«ãªããã¨ãããã¤ã user.human_enum_name_for(:status) #=> "å©ç¨ä¸" æè¡çãªé£é¡ã®è§£æ±ºã¨ãã¯å ¨ãçã£ã¦ããªãã¦ãã©ã¡ããã¨è¨ãã¨ããã®æã®ä»çµã¿ã«ã«ã¼ã«ãç¡ãã¦ã¢ããªå ã®ããããªã¨ããã«
{{#tags}}- {{label}}
{{/tags}}