Skip to content

Commit

Permalink
Improve README for 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jhawthorn committed Apr 26, 2018
1 parent a672aec commit 3934a3d
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,31 @@ This is the Internationalization project for [Solidus](https://solidus.io)

---

## Supported languages
## Changes in Version 2.0

We currently support the [following locales](https://github.com/solidusio-contrib/solidus_i18n/tree/master/config/locales)
by default. If you need a locale that is not in the list you can add a custom
translation file into your application by following the
[Rails translations guide](http://guides.rubyonrails.org/i18n.html#how-to-store-your-custom-translations).
solidus_i18n Version 2.0+ only contains translation files.

Previous versions of solidus_i18n included extra functionality like locale
selectors and which is now built in to Solidus 2.6+. Configuration for
`routing-fitler` has also been removed and must be configured manually
(See [Locale in URL](#locale-in-url)).

## Installation

Add the following to your `Gemfile`:

```ruby
gem 'solidus_i18n', '~> 2.0'
gem 'rails-i18n', '~> 5.1'
gem 'kaminari-i18n', '~> 0.5.0'
```

## Locale in URL

Older versions of solidus_i18n included the routing-filter gem and configured routes to include the locale in the URL.
This is still supported (maybe even recommended) but requires some additional configuration.

1. Add gem to your `Gemfile`, then run `bundle install`
1. Add this gem to your `Gemfile`, then run `bundle install`

``` ruby
gem 'routing-filter', '~> 0.6.0'
Expand All @@ -44,13 +48,20 @@ Rails.application.routes.draw do
end
```

3. Configure locale-fitler in `config/initializers/locale_filter.rb` (optional)
3. Configure routing-fitler in `config/initializers/locale_filter.rb` (optional)

``` ruby
# Do not include the default locale in the URL
RoutingFilter::Locale.include_default_locale = false
```

## Supported languages

We currently support the [following locales](https://github.com/solidusio-contrib/solidus_i18n/tree/master/config/locales)
by default. If you need a locale that is not in the list you can add a custom
translation file into your application by following the
[Rails translations guide](http://guides.rubyonrails.org/i18n.html#how-to-store-your-custom-translations).

## Updating Translations

If you want to improve the translations on your language, run the tasks:
Expand Down

0 comments on commit 3934a3d

Please sign in to comment.