Skip to content

jhovad/spree_i18n

This branch is 8 commits ahead of, 341 commits behind spree-contrib/spree_i18n:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Josef Hovad
Sep 6, 2017
7330f8e · Sep 6, 2017
Jan 11, 2017
Jun 11, 2015
Sep 6, 2017
Jul 20, 2017
Jul 20, 2017
Jul 20, 2017
Jul 20, 2017
Jul 20, 2017
Feb 26, 2016
Aug 11, 2014
Dec 22, 2014
Jul 20, 2017
Jul 20, 2017
Jan 23, 2015
Jul 20, 2017
Jul 26, 2015
Dec 28, 2014
Dec 14, 2016
Dec 6, 2016
Jul 20, 2017

Repository files navigation

Spree Internationalization

Build Status Code Climate

This is the Internationalization project for Spree Commerce

See the official Internationalization documentation for more details.

Happy translating!


  1. Add this extension to your Gemfile with this line:

Spree >= 3.1

gem 'spree_i18n', github: 'spree-contrib/spree_i18n'

Spree 3.0 and Spree 2.x

gem 'spree_i18n', github: 'spree-contrib/spree_i18n', branch: 'X-X-stable'

The branch option is important: it must match the version of Spree you're using. For example, use 3-0-stable if you're using Spree 3-0-stable or any 3.0.x version.

  1. Install the gem using Bundler:
bundle install
  1. Copy & run migrations
bundle exec rails g spree_i18n:install
  1. Restart your server

If your server was running, restart it so that it can find the assets properly.


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 'spree_globalize', github: 'spree-contrib/spree_globalize', branch: 'master'

Upgrading

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

1. Migrate your database

bin/rake spree_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 spree_globalize gem in your Gemfile, if you want to keep them.

2. Remove Assets

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

//= require spree/backend/spree_i18n

and from vendor/assets/stylesheets/spree/backend/all.css

*= require spree/backend/spree_i18n

3. Remove Configuration

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


Contributing

See corresponding guidelines


Copyright (c) 2010-2015 Spree Commerce Inc. and other contributors. released under the New BSD License

About

I18n translation files for Spree Commerce.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 89.2%
  • HTML 5.3%
  • CSS 2.7%
  • CoffeeScript 2.2%
  • JavaScript 0.6%