Coder Social home page Coder Social logo

krzyszz / vbagoogle.apis.translate_wrapper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sergeyxa/google.apis.translate_wrapper

0.0 0.0 0.0 20 KB

Simple and short library allowing to use Google Cloud Translation API to translate a text - out of the box.

C# 73.29% VBA 26.71%

vbagoogle.apis.translate_wrapper's Introduction

Google.Apis.Translate Wrapper

What's this?

This is a tiny .NET library, which employs Google Cloud Translation for translating a text from one language to another.

The project depends on the Google.Apis, mainly on the Google.Apis.Translate.v3beta1, and, in fact, is just a minimalistic wrapper around these, making it simple to use the APIs for a text translation from .NET or any environment supporting COM.

The translator can be used from VBA (e.g. in Word, or Excel). The project was initially developed to translate some Word documents. The source of the macro demonstrating usage of the translator in Microsoft Word is included.

Building And Installation

Obtaining the key.json file from Google

To use the translation api you should register the project in the Cloud console.

The key.json file bounds the usage of the project to your own service account. Notice that after some limit, usage of the Cloud Translation API is paid. So be careful when publishing your own key.json. All the risks will be on you.

The compilation process simply copies the key.json file to the output folder. So you can replace the key with another one even when the library is already compiled.

Compiling And Installing

Fetch the source, open the solution on VS and compile. I developed the project on VS 2017, though most other versions should be capable to compile the code as well.

Notice that if you are going to use the library via COM, you have to run the Visual Studio as an administrator. Otherwise the VS won't register the library after it's compiled.

Is it free to use the Google Cloud Translation?

At the moment of this writing, Google allows to use the API for free to translate up to 500 000 characters monthly. It should be very enough for personal use. For the characters above, you will have to pay. See Pricing page for details.

vbagoogle.apis.translate_wrapper's People

Contributors

sergeyxa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.