# Google Translate Diff

> A Ruby gem to use the Google Translation API for long texts on multi-lingual websites.

- URL: https://evilmartians.com/opensource/google-translate-diff
- GitHub: https://github.com/gzigzigzeo/google_translate_diff
- Authors: Viktor Sokolov

---

Google Translate Diff is a Ruby gem for everyone who uses the Google Translation API to deal with long texts on multi-lingual websites. We use it daily to process a massive amount of automated translations for our projects, and it saves our customers (and us) a lot of money by using smart caching algorithms.

Assume your project contains a significant amount of products descriptions which:
- require re-translation each time user edits them;
- have a lot of equal parts (like return policy);
- change frequently.

If your user changes a single word within the long description, you will be charged for the re-translation of the whole text.

A much better approach is to try to translate every repeated structural element (sentence) in your texts array just once to save money. This Ruby gem helps to make it done.

*Read also Evil Martians' article*: https://evilmartians.com/chronicles/spend-less-on-google-translate
