solidus_locale_ja
It provides the Japanese to Solidus.
Installation
Add to your Gemfile:
gem 'solidus', '~> 2.1.0'
gem 'solidus_auth_devise'
gem 'rails-i18n'
gem 'devise-i18n'
gem 'solidus_locale_ja'
gem 'kaminari-i18n'
Run the bundle
command to install.
After installing gems, you'll have to run the generators to create necessary configuration files and migrations. and Run migrations to create the new models in the database.
$ bundle exec rails g spree:install --migrate=false --sample=false --seed=false
$ bundle exec rake railties:install:migrations
$ bundle exec rake db:migrate
Change db/seeds.rb
$ vi db/seeds.rb
Comment out the contents #Spree::Core::Engine.load_seed if defined?(Spree::Core)
.
# comment out
# Spree::Core::Engine.load_seed if defined?(Spree::Core)
build seed data.
$ bundle exec rake db:seed:solidus_locale_ja
Display japanese and Setting
edit config/initializers/locale.rb
and config/initializers/spree.rb
$ vi config/initializers/locale.rb
# open new file and add next line.
Rails.application.config.i18n.default_locale = :ja
$ vi config/initializers/spree.rb
Spree.config do |config|
# comment out
# config.currency = "USD"
#
# add next line
config.currency = "JPY"
config.default_country_id = 1
end
Spree::Frontend::Config.configure do |config|
# comment out
# config.locale = 'en'
#
# add next line
config.locale = 'ja'
end
Spree::Backend::Config.configure do |config|
# comment out
# config.locale = 'en'
#
# add next line
config.locale = 'ja'
end
Admin Setting
$ bundle exec rake spree_auth:admin:create
Start
$ bundle exec rails s