Skip to content
Newer
Older
100644 56 lines (34 sloc) 1.47 KB
ae6e744 @netskin-ci first commit
netskin-ci authored
1 =About
2
3 I18n backend which allows to store/get the translations from a database using a sequel.
4
5 ==Install
6
7 Simply install it as any other gem:
8
9 gem install i18n_backend_sequel
10
11 Or when using bundler, add it got your Gemfile:
12
13 gem i18n_backend_sequel
14
15 This should also install the geokit gem.
16
17 ==Quick Start
18
19 Create the table used to store i18n translations:
20
21 create_table :i18n_translations do |t|
22 String :locale, :null => false
23 String :key, :null => false
24 String :value, :text => true
25 String :interpolations, :text => true
26 TrueClass :is_proc, :null => false, :default => false
27 primary_key [:locale, :key]
28 end
29
30 Make I18n use it as its backend:
31
32 I18n.backend = I18n::Backend::Sequel.new
33
34 If you want sequel to add missing translations to the database prepend this too:
35
36 I18n::Backend::Sequel.send(:include, I18n::Backend::Sequel::Missing)
37
38 ==Todo
39
40 * Source documentation (rdoc)
41 * Tests
42
43 ==Contributing
44
45 If you'd like to contribute a feature or bugfix: Thanks! To make sure your
46 fix/feature has a high chance of being included, please read the following
47 guidelines:
48
49 1. Fork the project.
50 2. Make your feature addition or bug fix.
51 3. Add tests for it. This is important so we don’t break anything in a future version unintentionally.
52 4. Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
53 5. Send me a pull request. Bonus points for topic branches.
54
55
Something went wrong with that request. Please try again.