Skip to content

antoniobonanno/solidus_i18n

 
 

Repository files navigation

Solidus Internationalization

Build Status Code Climate Gem Version

This is the Internationalization project for Solidus


Installation

Add the following to your Gemfile:

gem 'solidus_i18n', github: 'solidusio-contrib/solidus_i18n', branch: 'master'

Run bundle install

You can use the generator to install migrations and append solidus_i18n assets to your app solidus manifest file.

bin/rails g solidus_i18n:install

This will insert these lines into your Spree assets manifests:

In vendor/assets/javascripts/spree/frontend/all.js

//= require spree/frontend/solidus_i18n

In vendor/assets/javascripts/spree/backend/all.js

//= require spree/backend/solidus_i18n

Model Translations

We removed support for translating models into a separate Gem.

Please update your Gemfile if you still need the model translations.

# Gemfile
gem 'solidus_globalize', github: 'solidusio-contrib/solidus_globalize', branch: 'master'

Upgrading

WARNING: If you want to keep your model translations, be sure to add the solidus_globalize gem to your Gemfile before migrating the database. Otherwise you will loose your translations!

1. Migrate your database

bin/rake solidus_i18n:upgrade
bin/rake db:migrate

Note: The migration automatically skips the removal of the translations tables. So it's safe to run the migration without data loss. But be sure to have the solidus_globalize gem in your Gemfile, if you want to keep them.

2. Remove Configuration

Remove all occurrences of SolidusI18n::Config.supported_locales from your code.

Contributing

Solidus is an open source project and we encourage contributions. Please read CONTRIBUTING.md before contributing.

About

🌏 This is the Internationalization project for Solidus

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 90.8%
  • HTML 4.8%
  • CSS 2.9%
  • CoffeeScript 1.1%
  • JavaScript 0.4%