README.md in deepl-rb-2.2.0 vs README.md in deepl-rb-2.2.1

- old
+ new

@@ -85,13 +85,15 @@ | --------------- | --------------- | `EN` | English | `DE` | German | `FR` | French | `ES` | Spanish +| `PT` | Portuguese | `IT` | Italian | `NL` | Dutch | `PL` | Polish +| `RU` | Russian You can also use custom query parameters, like `tag_handling`, `split_sentences`, `non_splitting_tags` or `ignore_tags`: ```rb translation = DeepL.translate '<p>A sample</p>', 'EN', 'ES', @@ -126,15 +128,16 @@ ### Handle exceptions You can capture and process exceptions that may be raised during API calls. These are all the possible exceptions: -| Exception class | Descripcion | +| Exception class | Description | | --------------- | ----------- | -| `DeepL::Exceptions::AuthorizationFailed` | The authorization process has failed. Check your auth_key value. | +| `DeepL::Exceptions::AuthorizationFailed` | The authorization process has failed. Check your `auth_key` value. | | `DeepL::Exceptions::BadRequest` | Something is wrong in your request. Check `exception.message` for more information. | | `DeepL::Exceptions::LimitExceeded` | You've reached the API's call limit. | +| `DeepL::Exceptions::QuotaExceeded` | You've reached the API's character limit. | | `DeepL::Exceptions::RequestError` | An unkown request error. Check `exception.response` and `exception.request` for more information. | An exampling of handling a generic exception: ```rb @@ -144,11 +147,33 @@ puts 'Oops!' puts "Code: #{e.response.code}" puts "Response body: #{e.response.body}" puts "Request body: #{e.request.body}" end +``` +## Integrations + +### Ruby on Rails + +You may use this gem as a standalone service by creating an initializer on your +`config/initializers` folder with your DeepL configuration. For example: + +```rb +# config/initializers/deepl.rb +DeepL.configure do |config| + # Your configuration goes here +end ``` + +Since the DeepL service is defined globally, you can use service anywhere in your code +(controllers, models, views, jobs, plain ruby objects… you name it). + +### i18n-tasks + +You may also take a look at [`i18n-tasks`](https://github.com/glebm/i18n-tasks), which is a gem +that helps you find and manage missing and unused translations. `deepl-rb` is used as one the +backend services to translate content. ## Development Clone the repository, and install its dependencies: