API Client library for the Cloud Translation V2 API
Cloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service.
Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
in security maintenance, and not end of life. Older versions of Ruby may
still work, but are unsupported and not recommended. See
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
support schedule.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [1.1.0 (latest)](/ruby/docs/reference/google-cloud-translate-v2/latest)\n- [1.0.1](/ruby/docs/reference/google-cloud-translate-v2/1.0.1)\n- [0.5.1](/ruby/docs/reference/google-cloud-translate-v2/0.5.1)\n- [0.4.1](/ruby/docs/reference/google-cloud-translate-v2/0.4.1)\n- [0.3.1](/ruby/docs/reference/google-cloud-translate-v2/0.3.1) \n\nRuby Client for the Cloud Translation V2 API\n============================================\n\nAPI Client library for the Cloud Translation V2 API\n\nCloud Translation can dynamically translate text between thousands of language pairs. Translation lets websites and programs programmatically integrate with the translation service.\n\n\u003chttps://github.com/googleapis/google-cloud-ruby\u003e\n\nInstallation\n------------\n\n $ gem install google-cloud-translate-v2\n\nBefore You Begin\n----------------\n\nIn order to use this library, you first need to go through the following steps:\n\n1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project)\n2. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project)\n3. [Set up authentication.](./AUTHENTICATION \"Set up authentication.\")\n\nQuick Start\n-----------\n\n```ruby\nrequire \"google/cloud/translate/v2\"\n\nclient = Google::Cloud::Translate::V2.new\n\ntranslation = client.translate \"Hello world!\", to: \"la\"\n\nputs translation #=\u003e Salve mundi!\n\ntranslation.from #=\u003e \"en\"\ntranslation.origin #=\u003e \"Hello world!\"\ntranslation.to #=\u003e \"la\"\ntranslation.text #=\u003e \"Salve mundi!\"\n```\n\nView the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-translate-v2/latest)\nfor class and method documentation.\n\nSupported Ruby Versions\n-----------------------\n\nThis library is supported on Ruby 3.0+.\n\nGoogle provides official support for Ruby versions that are actively supported\nby Ruby Core---that is, Ruby versions that are either in normal maintenance or\nin security maintenance, and not end of life. Older versions of Ruby *may*\nstill work, but are unsupported and not recommended. See\n\u003chttps://www.ruby-lang.org/en/downloads/branches/\u003e for details about the Ruby\nsupport schedule."]]