Fix translate sample
This commit is contained in:
parent
87ed3e421b
commit
c27018d3c8
|
@ -201,7 +201,7 @@ require 'google/apis/translate_v2'
|
||||||
|
|
||||||
translate = Google::Apis::TranslateV2::TranslateService.new
|
translate = Google::Apis::TranslateV2::TranslateService.new
|
||||||
translate.key = 'YOUR_API_KEY_HERE'
|
translate.key = 'YOUR_API_KEY_HERE'
|
||||||
result = translate.list_translations(source: 'en', target: 'es', q: 'Hello world!')
|
result = translate.list_translations('Hello world!', 'es', source: 'en')
|
||||||
puts result.translations.first.translated_text
|
puts result.translations.first.translated_text
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue