|
1 | 1 | # ActiveAdmin::Globalize
|
| 2 | + |
2 | 3 | Makes it easy to translate your resource fields.
|
3 | 4 |
|
4 | 5 | ## Installation
|
5 | 6 |
|
| 7 | +This version targets Rails 4 and greater and ActiveAdmin >= 1.0.0.pre. |
| 8 | + |
6 | 9 | ```ruby
|
7 |
| -gem 'activeadmin-globalize', '~> 0.6.3' |
| 10 | +gem 'activeadmin-globalize', '~> 1.0.0.pre', github: 'fabn/activeadmin-globalize', branch: 'develop' |
8 | 11 | ```
|
9 | 12 |
|
10 |
| -This version targets Rails 3.2.x only and ActiveAdmin ~> 0.6.3. |
| 13 | +As soon as ActiveAdmin 1.x is released to rubygems, I'll release the gem with no need for github dependency. See |
| 14 | +[this issue](https://github.com/activeadmin/activeadmin/issues/3448) for more details. |
| 15 | + |
| 16 | +Previous version with support for Rails 3 is maintained in branch [support/0.6.x](https://github.com/fabn/activeadmin-globalize/tree/support/0.6.x) |
11 | 17 |
|
12 | 18 | ## Your model
|
13 | 19 |
|
|
19 | 25 | ## Editor configuration
|
20 | 26 |
|
21 | 27 | ```ruby
|
| 28 | + |
| 29 | +# For usage with strong parameters you'll need to permit them |
| 30 | +permit_params translations_attributes: [:id, :locale, :title, :content, :_destroy] |
| 31 | + |
22 | 32 | index do
|
23 | 33 | # textual translation status
|
24 | 34 | translation_status
|
|
39 | 49 | ```
|
40 | 50 | If `switch_locale` is set, each tab will be rendered switching locale.
|
41 | 51 |
|
42 |
| -## Friendly ID |
43 |
| - |
44 |
| -If you want to use Friendly ID together with Globalize, please take a look |
45 |
| -at the `activeadmin-seo` gem. |
46 | 52 |
|
47 | 53 | ## Hints
|
48 | 54 |
|
49 | 55 | To use the dashed locale keys as 'pt-BR' or 'pt-PT' you need to convert a string
|
50 | 56 | to symbol (in application.rb)
|
51 | 57 |
|
| 58 | +```ruby |
52 | 59 | config.i18n.available_locales = [:en, :it, :de, :es, :"pt-BR"]
|
| 60 | +``` |
53 | 61 |
|
54 | 62 | ## Credits
|
55 | 63 |
|
56 | 64 | This work is based on original idea by [@stefanoverna](https://github.com/stefanoverna/activeadmin-globalize),
|
57 |
| - I needed it for AA 0.6.x so I forked the original project. |
| 65 | + I needed it for AA 0.6.x so I forked the original project and expanded it with more features. |
0 commit comments