GithubHelp home page GithubHelp logo

adrenak / unilang Goto Github PK

View Code? Open in Web Editor NEW
37.0 5.0 3.0 897 KB

Translate text from one language to another using Google Translate

License: MIT License

C# 100.00%
unity language-detection language-translation-service

unilang's Introduction

UniLang

Translate text from one language to another using Google Translate

About

UniLang uses the Google Translation API to translate between languages. All languages supported by the Google service are supported in UniLang as well

Classes

  • Translator : A class that takes a source and target language. Exposes the translation feature using Translator.Run method, which accepts the text to be translated and returns result as a List of TranslatedTextPair objects.
  • TranslatedTextPair : Pretty much a Pair<string, string> that holds the original and translated texts to report back the translation results.
  • Language : Holds the ISO standard codes of the languages for typesafety

Usage

Translator translator = Translator.Create(Language.Auto, Language.French);
translator.Run("Text to translate. Can have multiple sentences.", results => {
    foreach (var result in results)
        Debug.Log(result.original + " => " + result.translated);
});

Soon

  • Recognizer : A class that recognizes the language given to it.
  • Ability to translate several passages of text at once

Contact

@www
@github
@twitter

unilang's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

unilang's Issues

Doesn't work on android

Hai,

This project when i am running on Unity Editor, its working great. but when i am running on Android i am getting following :

E/Unity (25648): NullReferenceException: Object reference not set to an instance of an object
E/Unity (25648): at UniLang.Example.m__0 (UniLang.TranslatedTextPair[] results) [0x00000] in :0
E/Unity (25648): at UniLang.Translator+c__Iterator0.MoveNext () [0x00000] in :0
E/Unity (25648): at UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) [0x00000] in :0

Please Help.

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.