{"id":22559564,"url":"https://github.com/franck-gaspoz/gtranslatorapi","last_synced_at":"2025-04-10T09:27:10.986Z","repository":{"id":54613577,"uuid":"325403796","full_name":"franck-gaspoz/GTranslatorAPI","owner":"franck-gaspoz","description":"Google Translate Rest API (Free) - .NET Core 5 , .NetStandard2.1","archived":false,"fork":false,"pushed_at":"2021-11-25T11:23:51.000Z","size":118,"stargazers_count":23,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T08:21:13.624Z","etag":null,"topics":["api","csharp","google-translator","netcore","translation","translator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franck-gaspoz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-29T22:55:34.000Z","updated_at":"2025-01-30T14:09:52.000Z","dependencies_parsed_at":"2022-08-13T21:40:14.634Z","dependency_job_id":null,"html_url":"https://github.com/franck-gaspoz/GTranslatorAPI","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franck-gaspoz%2FGTranslatorAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franck-gaspoz%2FGTranslatorAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franck-gaspoz%2FGTranslatorAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franck-gaspoz%2FGTranslatorAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franck-gaspoz","download_url":"https://codeload.github.com/franck-gaspoz/GTranslatorAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190918,"owners_count":21062373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","google-translator","netcore","translation","translator"],"created_at":"2024-12-07T21:07:28.399Z","updated_at":"2025-04-10T09:27:10.959Z","avatar_url":"https://github.com/franck-gaspoz.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GTranslatorAPI\nGoogle Translate Rest API (Free) - .NET Core 5 , .NetStandard2.1\nVSCode / Visual Studio\n\u003chr\u003e\n\n[![licence mit](https://img.shields.io/badge/licence-MIT-blue.svg)](license.md) This project is licensed under the terms of the MIT license: [LICENSE.md](LICENSE.md)  \n\n![last commit](https://img.shields.io/github/last-commit/franck-gaspoz/GTranslatorAPI?style=plastic)\n![version](https://img.shields.io/github/v/tag/franck-gaspoz/GTranslatorAPI?style=plastic)\n\n**a C# library that deals with Google Translate REST API. Offers google translate service operations from a C# software (with no api token)**\n\n```CSharp\n\nusing GTranslatorAPI;\n\n...\n\nvar translator = new Translator();\n\n// source language, target language, text to be translated\nvar result = await translator.TranslateAsync(Languages.en, Languages.fr, \"text to be translated\");\n\n// output translated text\nSystem.Console.WriteLine(result);\n\n```\n\n## Get the library project (vscode example)\n### source from GitHub:\n```dosbatch\ncd myProjects\ngit clone https://github.com/franck-gaspoz/GTranslatorAPI.git\ncd .\\GTranslatorAPI\\\ncode .\n```\n*then go Run \u003e Start Debugging , select .Net Core engine*, you should get the output:\n```\nGTranslator API CLI 2.0.0.0\n(c) franck.gaspoz@gmail.com 2021 License MIT\n\ncommand line syntaxes:\n\n    source_langid target_langid text [-q] [-w]\n        source_langid : original text lang id\n        target_langid : translated text lang id\n        q : turn off all outputs excepting errors\n\n    -l | --list [-w]\n        l | list : dump list of languages ids \u0026 names\n\n        w : wait a key press before exit\n```\n### package from nuget:\n```dosbatch\ndotnet add package GTranslatorAPI --version 2.0.0 --source https://www.nuget.org/api/v2/package/\n```\n\n### package from GitHub:\n```dosbatch\ndotnet add package GTranslatorAPI --version 2.0.0 --source https://nuget.pkg.github.com/franck-gaspoz/index.json\n```\n\n## Use the library\nlet's build a new C# console project for testing the GTranslatorAPI nuget package, using powershell, dotnet and vscode :\n```dosbatch\nmkdir MyProject\ncd MyProject\ndotnet new console\ndotnet add package GTranslatorAPI --version 2.0.0\ncode .\n```\nlet's change the default main method in Program.cs, to change its default behavior (output 'Hello world!') by a new one, that **adds a translation of 'Hello world!' to spanish**, using the GTranslatorAPI :\n```C#\nusing System;\nusing GTranslatorAPI;\n\nnamespace MyProject\n{\n    class Program\n    {\n        static async Task Main(string[] args)\n        {\n            string s = \"Hello world!\";\n            Console.WriteLine(s);\n            \n            var translator = new Translator();\n            var result = await translator.TranslateAsync(Languages.en,Languages.es,s);         \n            \n            Console.WriteLine(result.TranslatedText);    \n            \n            Console.WriteLine(dbg);\n        }\n    }\n}\n\n```\nthen run the project (ctrl+F5 | Run \u003e Start without debugging). You should get:\n\n![run sample in vscode](Doc/run2.png)\n\n\u003chr\u003e\n\n\u003e ### :information_source: About this repository\n\u003e To go further, please read informations at : [http://franckgaspoz.fr/en/use-google-translate-for-free-on-the-command-line/](http://franckgaspoz.fr/en/use-google-translate-for-free-on-the-command-line/) or contact the autor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranck-gaspoz%2Fgtranslatorapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranck-gaspoz%2Fgtranslatorapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranck-gaspoz%2Fgtranslatorapi/lists"}