{"id":14980393,"url":"https://github.com/lifailon/console-translate","last_synced_at":"2025-10-29T00:30:34.195Z","repository":{"id":206953131,"uuid":"718058926","full_name":"Lifailon/Console-Translate","owner":"Lifailon","description":"Cross-platform client for translating text in the console, uses API Google (edded public free token), MyMemory and DeepLX (no token required).","archived":false,"fork":false,"pushed_at":"2024-03-20T07:23:11.000Z","size":34675,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"rsa","last_synced_at":"2024-04-26T18:22:02.801Z","etag":null,"topics":["api","console-application","cross-platform","deepl","deeplx","free-translation","google","google-translate","google-translate-api","linux","module","mymemory","mymemory-api","powershell","powershell-core","powershell-module","translate","translate-api","translation","windows"],"latest_commit_sha":null,"homepage":"https://nuget.org/packages/Console-Translate","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lifailon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-13T09:39:47.000Z","updated_at":"2024-03-22T09:10:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"b4591b67-d3d6-4f14-b9eb-54a9987f3d48","html_url":"https://github.com/Lifailon/Console-Translate","commit_stats":null,"previous_names":["lifailon/console-translate"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FConsole-Translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FConsole-Translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FConsole-Translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lifailon%2FConsole-Translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lifailon","download_url":"https://codeload.github.com/Lifailon/Console-Translate/tar.gz/refs/heads/rsa","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238743913,"owners_count":19523201,"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","console-application","cross-platform","deepl","deeplx","free-translation","google","google-translate","google-translate-api","linux","module","mymemory","mymemory-api","powershell","powershell-core","powershell-module","translate","translate-api","translation","windows"],"created_at":"2024-09-24T14:01:42.274Z","updated_at":"2025-10-29T00:30:33.009Z","avatar_url":"https://github.com/Lifailon.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    \u003cimg src=\"image/x256.png\" width=\"35\" /\u003e Console-Translate\n\u003ch2\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://nuget.org/packages/Console-Translate\"\u003e\u003cimg title=\"NuGet Version\"src=\"https://img.shields.io/nuget/v/Console-Translate?logo=NuGet\u0026label=NuGet\u0026color=blue\u0026logoColor=blue\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://www.myget.org/feed/lifailon/package/nuget/Console-Translate\"\u003e\u003cimg title=\"MyGet Version\"src=\"https://img.shields.io/myget/lifailon/v/Console-Translate?logo=MyGet\u0026label=MyGet\u0026color=white\u0026logoColor=white\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n\u003ch3 align=\"center\"\u003e\n    ⚠ This module is not planned to be supported.\n    \u003cbr\u003e\n    Try it cross-platform \u003ca href=\"https://github.com/Lifailon/multranslate\" target=\"_blank\"\u003eTUI for translating text\u003c/a\u003e using multiple providers simultaneously. \n\u003c/h3\u003e\n\n---\n\nPowerShell module for **free text translation** using [Google](https://github.com/matheuss/google-translate-api) (public [serverless](https://github.com/olavoparno/translate-serverless-vercel) on Vercel), [DeepLX](https://github.com/OwO-Network/DeepLX) (public [serverless](https://github.com/LegendLeo/deeplx-serverless) on [Vercel](https://github.com/bropines/Deeplx-vercel)), [MyMemory](https://mymemory.translated.net/doc/spec.php) and [Reverso](https://www.reverso.net/text-translation) providers via `REST API` (no token required).\n\nThis module also automates the process of installing, updating, managing and working with the DeepLX server.\n\n- 💡 [About](#-about)\n- 🚀 [Install module to Windows](#-install-module-to-windows)\n- 🐧 [Install module to Linux](#-install-module-to-linux)\n- 🎉 [Examples](#-examples)\n- 🔨 [DeepLX](#-deeplx)\n- 📢 [Module not using API](#-module-not-using-api)\n\n## 💡 About\n\nThe module can be very useful if you spend a lot of time in the console or do not want to use a browser or third-party applications to translate text.\n\nThe work of the **module is automated and free of charge**, no additional intervention in the work of the module is required from you.\n\nThe process of determining the language for the `LanguageSource` and `LanguageTarget` parameters is automated between **Russian and English**. This process can be automated for any language.\n\nThis module also automates the process of launching the DeepLX server for local or remote use on other machines (e.g. those without Internet access).\n\nTested on Windows 10/11 and Ubuntu Server 20.04+ using PowerShell Core version 7.2 +.\n\n---\n\n## 🚀 Install module to Windows\n\n### [NuGet](https://www.nuget.org/packages/Console-Translate)\n\n- Pre-register the NuGet package manager if you have not done so previously:\n\n```PowerShell\nRegister-PSRepository -Name \"NuGet\" -SourceLocation \"https://www.nuget.org/api/v2\" -InstallationPolicy Trusted\n```\n\n- Install the module:\n\n```PowerShell\nInstall-Module Console-Translate -Repository NuGet\n```\n\n### [MyGet](https://www.myget.org/feed/lifailon/package/nuget/Console-Translate)\n\n```PowerShell\nRegister-PSRepository -Name \"lifailon\" -SourceLocation \"https://www.myget.org/F/lifailon/api/v2\" -InstallationPolicy Trusted\nInstall-Module Console-Translate -Repository lifailon\n```\n\n\u003c!--\n- Use the [Chocolatey](https://community.chocolatey.org/packages/Console-Translate) package manager:\n\n```PowerShell\nchoco install console-translate\n```\n--\u003e\n\n### [Scoop](https://scoop.sh)\n\n- Install the package manager:\n\n```PowerShell\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser \u0026\u0026 irm https://get.scoop.sh | Invoke-Expression\n```\n\n- Install the module:\n\n```PowerShell\nscoop bucket add Console-Translate https://github.com/Lifailon/Console-Translate.git\nscoop install Console-Translate\n```\n\n- To remove module:\n\n```PowerShell\nscoop uninstall Console-Translate \u0026\u0026 scoop bucket rm Console-Translate\n```\n\n### Deploy from GitHub\n\nDeployment a module from the GitHub repository with a single command in the console:\n\n```PowerShell\nInvoke-Expression(New-Object Net.WebClient).DownloadString(\"https://raw.githubusercontent.com/Lifailon/Console-Translate/rsa/deploy-module.ps1\")\n```\n\n- Import the module:\n\n```PowerShell\nImport-Module Console-Translate\nGet-Command -Module Console-Translate\n\nCommandType     Name                 Version    Source\n-----------     ----                 -------    ------\nFunction        Get-Translate        0.3        Console-Translate\nFunction        Install-DeepLX       0.3        Console-Translate\nFunction        Start-DeepLX         0.3        Console-Translate\nFunction        Stop-DeepLX          0.3        Console-Translate\nFunction        Get-DeepLX           0.3        Console-Translate\n```\n\n## 🐧 Install module to Linux\n\n💡 Dependence: [PowerShell Core](https://github.com/PowerShell/PowerShell)\n\n- Example install PowerShell to Ubuntu:\n\n```Bash\nsudo apt-get install -y wget apt-transport-https software-properties-common\ncurl -s https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -o packages-microsoft-prod.deb\nsudo dpkg -i packages-microsoft-prod.deb\nsudo apt-get update\nsudo apt-get install -y powershell\n```\n\n- Install module:\n\n```shell\npwsh -c 'Invoke-Expression(New-Object Net.WebClient).DownloadString(\"https://raw.githubusercontent.com/Lifailon/Console-Translate/rsa/deploy-module.ps1\")'\n```\n\nRun the PowerShell interpreter using the `pwsh` command. All commands for Windows are identical for execution in Linux by PowerShell Core.\n\n---\n\n## 🎉 Examples\n\nThe parameters limit the use of this cmdlet to two languages: **English** (`en`) and **Russian** (`ru`), for which there is **automatic detection of the source language at the PowerShell code level**.\n\n```PowerShell\nGet-Translate \"Module for text translation\" -Provider Google\nМодуль для перевода текста\n\nGet-Translate \"Модуль для перевода текста\"\nText translation module\n\nGet-Translate \"Hello друг\" -LanguageSelected\nLanguage Source: EN\nLanguage Target: RU\nПривет друг\n\nGet-Translate \"Привет world\" -LanguageSelected\nLanguage Source: RU\nLanguage Target: EN\nHello world\n\nGet-Translate \"Module for text translation\" -Provider DeepL\nМодуль для перевода текста\n\nGet-Translate \"Module for text translation\" -Provider MyMemory\nМодуль для перевода текста\nТекстовый перевод.\nПеревод текста БД\n\nGet-Translate \"Module for text translation\" -Provider Reverso\nМодуль перевода текстов\n```\n\n## 🔨 DeepLX\n\nSupported languages from the drop-down list (encoded in the parameter) with support for **automatic language detection at the api level**.\n\n| Abbr | EN (RU)                        |\n| -    | -                              |\n| `EN` | English (Английский)           |\n| `RU` | Russian (Русский)              |\n| `JA` | Japanese (Японский)            |\n| `ZH` | Chinese (Китайский)            |\n| `KO` | Korean (Корейский)             |\n| `TR` | Turkish (Турецкий)             |\n| `UK` | Ukrainian (Украинский)         |\n| `SK` | Slovak (Словацкий)             |\n| `SL` | Slovenian (Словенский)         |\n| `LT` | Lithuanian (Литовский)         |\n| `PL` | Polish (Польский)              |\n| `CS` | Czech (Чешский)                |\n| `FI` | Finnish (Финский)              |\n| `ET` | Estonian (Эстонский)           |\n| `BG` | Bulgarian (Болгарский)         |\n| `DA` | Danish (Датский)               |\n| `LV` | Latvian (Латышский)            |\n| `IT` | Italian (Итальянский)          |\n| `ES` | Spanish (Испанский)            |\n| `FR` | French (Французский)           |\n| `PT` | Portuguese (Португальский)     |\n| `RO` | Romanian (Румынский)           |\n| `SV` | Swedish (Шведский)             |\n| `HU` | Hungarian (Венгерский)         |\n| `EL` | Greek (Греческий)              |\n| `NB` | Norwegian Bokmal (Норвежский)  |\n| `NL` | Dutch (Нидерландский)          |\n| `DE` | German (Немецкий)              |\n| `ID` | Indonesian (Индонезийский)     |\n| `AR` | Arabic (Арабский)              |\n\n### Local server\n\nInstall or update the [DeepLX](https://github.com/OwO-Network/DeepLX) server executable for local or remote use with a single command (for Windows and Linux):\n\n```PowerShell\nInstall-DeepLX\n```\n\nWhen calling the module, if the remote server address is not specified (**parameter: Server**), the **local server is started for the time of sending a request and receiving a response**, after which the server stops, it allows not to keep network socket open.\n\n```PowerShell\n# Russian to English\nGet-DeepLX \"Помоги перевести текст\"\nHelp translate a text\nHelp translate the text\nHelp me translate a text\n\n# English to Russian\nGet-DeepLX \"Help translate text\" ru\nПомочь перевести текст\nПомощь в переводе текста\n\n# English to Japanese\nGet-DeepLX \"Help translate text\" ja\nテキストの翻訳を手伝う\nテキストを翻訳する\nテキストの翻訳を支援\n\n# Japanese to Russian\nGet-DeepLX \"テキストの翻訳を手伝う\" ru\nПомогите перевести тексты.\nПомогите переводить тексты.\nПомогите перевести текст.\n\n# English to Chinese\nGet-DeepLX \"Help translate text\" zh\n帮助翻译文字\n协助翻译文本\n\n# English to Turkish\nGet-DeepLX \"Help translate text\" tr\nMetni çevirmeye yardımcı olun\nMetin çevirisine yardım edin\nMetni çevirmeye yardım et\n```\n\n### Remote server\n\nIf you need to use a single server to handle all requests from multiple clients on the network, you can use this construct:\n\n📭 **Start the server:**\n\n```PowerShell\nStart-DeepLX -Job\n\nStart-DeepLX -Status\nRunning\n```\n\nThis will allow you to run the server in the backgroundю. The default port is `1188` and the api token (this key is used for authorization on the server) is `7777777777`.\n\n✉️ **Execute a requests to the remote server:**\n\n```PowerShell\nGet-DeepLX -Text \"Перевод текста на удаленном сервере\" -Server 192.168.3.100\nTranslation of text on a remote server\nTranslate a text on a remote server\nTranslating text on a remote server\n\nGet-DeepLX -Text \"Перевод текста на удаленном сервере\" -Server 192.168.3.100 -Port 1188 -Token \"7777777777\"\nTranslation of text on a remote server\nTranslate a text on a remote server\nTranslating text on a remote server\n```\n\n✋ **Server stop:**\n\n```PowerShell\nStop-DeepLX\n\nStart-DeepLX -Status\nNot running\n```\n\n---\n\n## Windows Terminal\n\nTo speed up the process of interacting with the module, program hotkeys in [Windows Terminal](https://github.com/microsoft/terminal):\n\nOpen the `JSON configuration file` in Application Settings and add or edit the `Actions` block:\n\n```json\n\"actions\": \n    [\n        {\n            \"command\": \n            {\n                \"action\": \"copy\",\n                \"singleLine\": false\n            },\n            \"keys\": \"ctrl+c\" // default: ctrl+shift+c\n        },\n        {\n            \"command\": \"paste\",\n            // We save the classic interpreter insertion via ctrl+v, without forcing you to execute the code line by line\n            \"keys\": \"ctrl+shift+v\" // default: ctrl+v\n        },\n        {\n            \"command\": \n            {\n                \"action\": \"sendInput\",\n                \"input\": \"\\u0001\\u001b[3~Get-Translate -Provider Google ''\\u001b[D\"\n            },\n            \"keys\": \"ctrl+g\"\n        },\n        {\n            \"command\": \n            {\n                \"action\": \"sendInput\",\n                \"input\": \"\\u0001\\u001b[3~Get-Translate -Provider Google -Text $(Get-Clipboard)\\u001b[D\\r\"\n            },\n            \"keys\": \"ctrl+shift+g\"\n        }\n    ]\n```\n\nThe first two command blocks are responsible for redefining the copy and paste keys from the clipboard (use `Ctrl+C` and `Ctrl+V` as in the classic PowerShell terminal, getting rid of intrusive warnings about pasting text and line-by-line execution of commands).\n\nThe third parameter is responsible for processing the `Ctrl+G` key press, which preliminarily clears the input line, after which it causes the text to be inserted: `Get-Translate -Provider Google ''` and moves the cursor to the center of the quotation marks, which allows you to enter text and call translation immediately after pressing . The last command does the same thing, but pastes text from the clipboard (using the built-in `Get-Clipboard` command) and calls execution to instantly translate the text when you press `Ctrl+Shift+G`.\n\n\u003e Similarly, you can assign the translation call for DeepL/DeepLX, MyMemory and Reverso to other key combinations.\n\n---\n\n## 📢 Module not using API\n\nYou can use a module that dont use an API, instead **using Selenium via .NET to PowerShell** for compose requests directly to the application:\n\nAutomated deployment and updating of all dependencies: Deploy Selenium: [Deploy-Selenium](https://github.com/Lifailon/Deploy-Selenium)\n\nRepository: **[Selenium-Modules](https://github.com/Lifailon/Selenium-Modules)**\n\nModule: **[Get-Translate](https://github.com/Lifailon/Selenium-Modules/blob/rsa/Modules/Get-Translation/Get-Translation.psm1)**","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifailon%2Fconsole-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifailon%2Fconsole-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifailon%2Fconsole-translate/lists"}