translation_rails 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +45 -14
- data/lib/translation_rails/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -1,28 +1,59 @@
|
|
1
|
-
|
2
|
-
=================
|
1
|
+
## Translation Rails
|
3
2
|
|
4
|
-
|
3
|
+
## Getting started
|
5
4
|
|
6
|
-
|
5
|
+
```ruby
|
6
|
+
gem 'translation_center', :git => 'https://github.com/jypandjio/translation_center'
|
7
|
+
gem 'translation_rails'
|
8
|
+
```
|
7
9
|
|
8
|
-
|
10
|
+
Run bundle install command
|
9
11
|
|
10
|
-
|
12
|
+
Install translation_rails in your application
|
11
13
|
|
12
|
-
|
14
|
+
```ruby
|
15
|
+
rails generate translation_rails:install
|
16
|
+
```
|
13
17
|
|
14
|
-
|
18
|
+
Run the migrations
|
15
19
|
|
16
|
-
|
20
|
+
```ruby
|
21
|
+
rake db:migrate
|
22
|
+
```
|
17
23
|
|
18
|
-
|
24
|
+
Run this rake to add some languages to the translation center
|
19
25
|
|
20
|
-
|
26
|
+
```ruby
|
27
|
+
rake translation_rails:add_lang[en]
|
28
|
+
rake translation_rails:add_lang[nl]
|
29
|
+
```
|
21
30
|
|
22
|
-
|
31
|
+
This will add three languages to the translation_center,you need to add them in the config/translation_center.yml
|
23
32
|
|
24
|
-
|
33
|
+
```ruby
|
34
|
+
development:
|
35
|
+
lang:
|
36
|
+
en:
|
37
|
+
name: 'English'
|
38
|
+
direction: 'ltr'
|
39
|
+
ar:
|
40
|
+
name: 'Arabic'
|
41
|
+
direction: 'rtl'
|
42
|
+
de:
|
43
|
+
name: 'German'
|
44
|
+
direction: 'ltr'
|
45
|
+
```
|
25
46
|
|
47
|
+
To migrate translations from yaml files to TranslationCenter database
|
26
48
|
|
49
|
+
```ruby
|
50
|
+
rake translation_center:yaml2db
|
51
|
+
```
|
27
52
|
|
28
|
-
|
53
|
+
To migrate translations from TranslationCenter database to yaml files
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
rake translation_center:db2yaml
|
57
|
+
```
|
58
|
+
|
59
|
+
Visit translation_center: http://localhost:port/translation_center
|