baidu_translate 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -10
- data/lib/baidu_translate/translation.rb +2 -0
- data/lib/baidu_translate/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: a80c12a2e790598102ca975459e8f61ac07a88ad
|
4
|
+
data.tar.gz: 513964888224de3528f3528233c027799da37a2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c322929eab503161f4dd82aebc38a91a7b4361b81ef32e2aa8d3f3f16469ef3016a9f9125d9b20cd3c44ecc94d196606f46b51ec661b1bc6c2c799161d16d6b7
|
7
|
+
data.tar.gz: 715492c87f7fcb7574ab70df493cc1d4776b2a3752571e22d53e26654efc3af097f995b5f5c68344a4643a25dbbc68bb359517248f550d017612b1e015523abd
|
data/README.md
CHANGED
@@ -20,22 +20,21 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
1. Register to Baidu Translate API at
|
24
|
-
(http://api.fanyi.baidu.com/)
|
23
|
+
1. Register to Baidu Translate API at http://api.fanyi.baidu.com/
|
25
24
|
|
26
25
|
2. Initialize BaiduTranslate using your AppID and Key.
|
27
26
|
|
28
|
-
```ruby
|
29
|
-
BaiduTranslate.setup(APP_ID, KEY)
|
30
|
-
```
|
27
|
+
```ruby
|
28
|
+
BaiduTranslate.setup(APP_ID, KEY)
|
29
|
+
```
|
31
30
|
|
32
31
|
3. Translate your strings
|
33
|
-
```ruby
|
34
|
-
BaiduTranslate.translate('Apple', :en, :zh)
|
35
|
-
# => "苹果"
|
36
|
-
```
|
32
|
+
```ruby
|
33
|
+
BaiduTranslate.translate('Apple', :en, :zh)
|
34
|
+
# => "苹果"
|
35
|
+
```
|
37
36
|
|
38
|
-
4. Check http://api.fanyi.baidu.com/api/trans/product/apidoc for the list of available languages and their codes and a list of possible errors.
|
37
|
+
4. Check http://api.fanyi.baidu.com/api/trans/product/apidoc/ for the list of available languages and their codes and a list of possible errors.
|
39
38
|
|
40
39
|
## Contributing
|
41
40
|
|