Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrenak/UniLang
Translate text from one language to another using Google Translate
https://github.com/adrenak/UniLang
language-detection language-translation-service unity
Last synced: 3 months ago
JSON representation
Translate text from one language to another using Google Translate
- Host: GitHub
- URL: https://github.com/adrenak/UniLang
- Owner: adrenak
- License: mit
- Created: 2018-05-14T10:25:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-14T12:14:13.000Z (over 6 years ago)
- Last Synced: 2024-07-14T13:36:22.981Z (4 months ago)
- Topics: language-detection, language-translation-service, unity
- Language: C#
- Size: 876 KB
- Stars: 37
- Watchers: 5
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity-open-source-on-github - UniLang - Translate text from one language to another using Google Translate (Script Utility)
README
# 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` 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](http://www.vatsalambastha.com)
[@github](https://www.github.com/adrenak)
[@twitter](https://www.twitter.com/adrenak)