README.md in i18n-js-4.0.0.alpha1 vs README.md in i18n-js-4.0.0.alpha2

- old
+ new

@@ -97,14 +97,13 @@ ### Using listen Create a file under `config/initializers/i18n.rb` with the following content: ```ruby -# frozen_string_literal: true - -require "i18n-js/listen" - -I18nJS.listen +Rails.application.config.after_initialize do + require "i18n-js/listen" + I18nJS.listen +end ``` The code above will watch for changes based on `config/i18n.yml` and `config/locales`. You can customize these options with `I18nJS.listen(config_file: "config/i18n.yml", locales_dir: "config/locales")`.