Sha256: cf1e9089e7fb8d47cb7254744f877a5ab5c65285ed39a98c3a3ef89e27af7436
Contents?: true
Size: 562 Bytes
Versions: 15
Compression:
Stored size: 562 Bytes
Contents
class Recipes::I18n < Rails::AppBuilder def ask languages = { "es-CL": "es-CL (Chile)", en: "en (USA)" } lang = answer(:locale) do languages.keys[Ask.list("What is the main locale of your app?", languages.values)] end set(:lang, lang) end def create gather_gem('rails-i18n') if equals?(:lang, :"es-CL") template('../assets/es-CL.yml', 'config/locales/es-CL.yml') end application("config.i18n.default_locale = '#{get(:lang)}'") application("config.i18n.fallbacks = [:es, :en]") end end
Version data entries
15 entries across 15 versions & 1 rubygems