{"id":16573845,"url":"https://github.com/shevonkuan/translate-server","last_synced_at":"2025-10-29T04:30:46.074Z","repository":{"id":143657223,"uuid":"610156304","full_name":"ShevonKuan/translate-server","owner":"ShevonKuan","description":"一个基于Golang构建的集成翻译api服务端。 An integrated translation api server built on Golang.","archived":false,"fork":false,"pushed_at":"2024-03-25T09:15:18.000Z","size":78,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T00:14:08.837Z","etag":null,"topics":["api-server","deepl-translation-api","golang","google-translate-api","translator"],"latest_commit_sha":null,"homepage":"https://translate-server-five.vercel.app","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShevonKuan.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-03-06T07:54:44.000Z","updated_at":"2024-06-17T07:12:06.000Z","dependencies_parsed_at":"2024-01-15T19:11:50.694Z","dependency_job_id":null,"html_url":"https://github.com/ShevonKuan/translate-server","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevonKuan%2Ftranslate-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevonKuan%2Ftranslate-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevonKuan%2Ftranslate-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShevonKuan%2Ftranslate-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShevonKuan","download_url":"https://codeload.github.com/ShevonKuan/translate-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219858494,"owners_count":16556043,"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-server","deepl-translation-api","golang","google-translate-api","translator"],"created_at":"2024-10-11T21:43:12.531Z","updated_at":"2025-10-29T04:30:45.761Z","avatar_url":"https://github.com/ShevonKuan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Translate-Server\n\n![translate-server](https://socialify.git.ci/ShevonKuan/translate-server/image?description=1\u0026descriptionEditable=%E4%B8%80%E4%B8%AA%E5%9F%BA%E4%BA%8EGolang%E6%9E%84%E5%BB%BA%E7%9A%84%E9%9B%86%E6%88%90%E7%BF%BB%E8%AF%91api%E6%9C%8D%E5%8A%A1%E7%AB%AF%E3%80%82%20An%20integrated%20translation%20api%20server%20built%20on%20Golang.\u0026font=Jost\u0026forks=1\u0026issues=1\u0026language=1\u0026name=1\u0026owner=1\u0026pattern=Solid\u0026pulls=1\u0026stargazers=1\u0026theme=Light)\n\n\u003cdiv\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/shevonkuan/translate-server\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/ShevonKuan/translate-server\" alt=\"latest version\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ShevonKuan/translate-server/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/ShevonKuan/translate-server\" alt=\"License\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ShevonKuan/translate-server/actions?query=workflow%3ABuild\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/ShevonKuan/translate-server/build.yml\" alt=\"Build status\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ShevonKuan/translate-server/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/release/ShevonKuan/translate-server\" alt=\"latest version\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n  \u003ca href=\"https://github.com/ShevonKuan/translate-server/discussions\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/discussions/ShevonKuan/translate-server?color=%23ED8936\" alt=\"discussions\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ShevonKuan/translate-server/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/downloads/ShevonKuan/translate-server/total?color=%239F7AEA\u0026logo=github\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n    \u003ca href=\"https://github.com/ShevonKuan/translate-server/releases\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/shevonkuan/translate-server?include_prereleases\u0026label=pre-release\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- \u003ca href=\"https://hub.docker.com/r/xhofe/alist\"\u003e\n    \u003cimg src=\"https://img.shields.io/docker/pulls/xhofe/alist?color=%2348BB78\u0026logo=docker\u0026label=pulls\" alt=\"Downloads\" /\u003e\n  \u003c/a\u003e --\u003e\n\n\u003cimg src=\"https://img.shields.io/github/go-mod/go-version/Shevonkuan/translate-server\"\u003e\n\u003c/div\u003e\n\n## Description\n\n### Support Translate Engine\n\n-   [x] [DeepL](https://www.deepl.com/translator)\n-   [x] [Google](https://translate.google.com)\n-   [ ] [tencent](https://fanyi.qq.com/)\n-   [ ] [baidu](https://fanyi.baidu.com/)\n-   [ ] [youdao](https://fanyi.youdao.com/)\n-   [ ] others..\n\n## Usage\n\n### Translate API\n\n#### Request\n\n-   method: `POST`\n-   url: `/translate` or `https://translate-server-five.vercel.app/api/translate`\n-   params: engine: `google` or `deepl`\n-   body application/json:\n\n```json\n{\n    \"text\": \"Hello world\",\n    \"source_lang\": \"en\",\n    \"target_lang\": \"zh\"\n}\n```\n\n##### Response\n\n```json\n{\n    \"alternatives\": [\"你好世界\", \"世界你好\"],\n    \"code\": 200,\n    \"data\": \"你好世界\"\n}\n```\n\n#### Request(JSONP)\n\nYou can use JSONP to request the api, just add `callback` param to the url, like this:\n\n-   method: `POST`\n-   url: `/translate?callback=tr` (In order to avoid abusing the public API, the vercel version of the API is not supported for jsonp requests.)\n-   params:\n    -   engine: `google` or `deepl`\n-   body application/json:\n\n```json\n{\n    \"text\": \"Hello world\",\n    \"source_lang\": \"en\",\n    \"target_lang\": \"zh\"\n}\n```\n\n##### Response\n\n```javascript\ntr({\n    alternatives: [\"你好世界\", \"世界你好\"],\n    code: 200,\n    data: \"你好世界\",\n});\n```\n\n### Translate XML\n\nAlways used to translate RSS feed:\n\n1. Add prefix `https://translate-server-five.vercel.app/api/rss?url=` to the original rss feed url. e.g.\n   `http://export.arxiv.org/rss/cs.DC`\n   -\u003e\n   `https://translate-server-five.vercel.app/api/rss?url=http://export.arxiv.org/rss/cs.DC`\n2. Add `\u0026engine=deepl` or `\u0026engine=google` to the end of the url. The default engine is google. if you want to specify the engine, you should run your own instance of the server instead of using the vercel one, like this:\n   `http://127.0.0.1:1188/rss?url=http://export.arxiv.org/rss/cs.DC\u0026engine=deepl`\n\n### Run with Docker\n\n// TODO\n\n## Author\n\n**Shevon Kwan** © [translate-server Contributors](https://github.com/ShevonKuan/translate-server/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshevonkuan%2Ftranslate-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshevonkuan%2Ftranslate-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshevonkuan%2Ftranslate-server/lists"}