rtl 0.2.2 → 0.2.3
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.
- checksums.yaml +4 -4
- data/README.md +22 -10
- data/lib/rtl/core.rb +1 -1
- data/lib/rtl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f29ce6d7cd35feb3e394b9db19248d5fb1ed1209
|
4
|
+
data.tar.gz: 4764067b643f9ff4be3db94b1186984e1c23de10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0f31ad9f71b08c39c1702584a8f12d8a0a65d95946942839d328ec536a64cfc6ea6d7f318e313a768aa338d75e047d09aec9aea26f21f3ae99f5f197a8787c
|
7
|
+
data.tar.gz: b3b00a657fb73e1b0faec27ecac519d8f59b65eb60971ecf2f0b77a23a5b4b9fce6a7151054e00750645d979d51445c1aa62e90f3116adcf6769f0481620d33e
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# RTL
|
2
|
+
[](https://rubygems.org/gems/rtl)
|
2
3
|
[](https://travis-ci.org/abarrak/rtl)
|
3
4
|
|
4
|
-
This gem helps you
|
5
|
+
This gem helps you check whether a language direction is right-to-left (RTL) or left-to-right (LTR) implicitly, by supplying its full name, iso code, or other options.
|
5
6
|
|
6
7
|
## Installation
|
7
8
|
|
@@ -25,42 +26,53 @@ $ gem install rtl
|
|
25
26
|
|
26
27
|
## Usage
|
27
28
|
|
29
|
+
#### Query a language by string or symbol:
|
30
|
+
|
28
31
|
```ruby
|
29
32
|
require 'rtl'
|
30
33
|
|
31
|
-
# Query a language by string or symbol.
|
32
34
|
Rtl.rtl? 'ar' #=> true
|
33
35
|
Rtl.rtl? :ara #=> true
|
36
|
+
```
|
34
37
|
|
38
|
+
#### Query a language by ISO 639 code, (the default) ..
|
35
39
|
|
36
|
-
|
40
|
+
```ruby
|
37
41
|
Rtl.rtl? :syc, :iso_code #=> true
|
38
42
|
Rtl.rtl? :eng #=> false
|
43
|
+
```
|
39
44
|
|
45
|
+
#### Or by ISO 15924 code ..
|
40
46
|
|
41
|
-
|
47
|
+
```ruby
|
42
48
|
Rtl.rtl? 'Hung', :iso_long_code #=> true
|
49
|
+
```
|
43
50
|
|
51
|
+
#### Or by ISO number ..
|
44
52
|
|
45
|
-
|
53
|
+
```ruby
|
46
54
|
Rtl.rtl? 130, :iso_number #=> true
|
55
|
+
```
|
47
56
|
|
48
|
-
|
49
|
-
|
57
|
+
#### Or by unicode alias ..
|
58
|
+
```ruby
|
50
59
|
Rtl.rtl? 'Hebrew', :unicode_alias #=> true
|
60
|
+
```
|
51
61
|
|
62
|
+
#### Or by full name ..
|
52
63
|
|
53
|
-
|
64
|
+
```ruby
|
54
65
|
Rtl.rtl? :Persian, :full_name #=> true
|
66
|
+
```
|
55
67
|
|
68
|
+
#### Get List of all languages by any of the above criteria:
|
56
69
|
|
57
|
-
|
70
|
+
```ruby
|
58
71
|
Rtl.rtl_languages
|
59
72
|
#=> ["ar", "ara", "arc", "ae", "ave", "egy", "he", "heb", "nqo", "pal", "phn", "sam", "syc", "syr", "fa", "per", "fas", "ku", "kur"]
|
60
73
|
|
61
74
|
Rtl.rtl_languages :iso_long_code
|
62
75
|
#=> ...
|
63
|
-
|
64
76
|
```
|
65
77
|
|
66
78
|
## Useful Links
|
data/lib/rtl/core.rb
CHANGED
data/lib/rtl/version.rb
CHANGED