Class: RnStack::I18nGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- RnStack::I18nGenerator
- Defined in:
- lib/generators/rn_stack/i18n/i18n_generator.rb
Instance Method Summary collapse
Instance Method Details
#setup_i18n ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/rn_stack/i18n/i18n_generator.rb', line 5 def setup_i18n say "Configuring I18n localization structure..." # Create config/locales structure create_file "config/locales/en.yml", <<~YAML en: hello: "Hello World" YAML create_file "config/locales/es.yml", <<~YAML es: hello: "Hola Mundo" YAML say "I18n locales scaffolded in config/locales/" end |