{"id":13712675,"url":"https://github.com/TheDavidDelta/lingva-translate","last_synced_at":"2025-05-06T22:31:22.904Z","repository":{"id":37650655,"uuid":"346112697","full_name":"thedaviddelta/lingva-translate","owner":"thedaviddelta","description":"Alternative front-end for Google Translate","archived":false,"fork":false,"pushed_at":"2023-08-01T10:39:09.000Z","size":792,"stargazers_count":1636,"open_issues_count":42,"forks_count":155,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-08T01:36:25.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://lingva.thedaviddelta.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thedaviddelta.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}},"created_at":"2021-03-09T18:59:23.000Z","updated_at":"2025-04-07T08:27:10.000Z","dependencies_parsed_at":"2024-01-12T22:10:21.274Z","dependency_job_id":null,"html_url":"https://github.com/thedaviddelta/lingva-translate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedaviddelta%2Flingva-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedaviddelta%2Flingva-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedaviddelta%2Flingva-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thedaviddelta%2Flingva-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thedaviddelta","download_url":"https://codeload.github.com/thedaviddelta/lingva-translate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252779060,"owners_count":21802872,"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":[],"created_at":"2024-08-02T23:01:21.193Z","updated_at":"2025-05-06T22:31:22.228Z","avatar_url":"https://github.com/thedaviddelta.png","language":"TypeScript","funding_links":[],"categories":["Translation","Overview","TypeScript","Alternative Frontends"],"sub_categories":["Imgur","Google Translate","Translate"],"readme":"# Lingva Translate\n\n\u003cimg src=\"public/logo.svg\" width=\"128\" align=\"right\"\u003e\n\n[![Travis Build](https://travis-ci.com/thedaviddelta/lingva-translate.svg?branch=main)](https://travis-ci.com/thedaviddelta/lingva-translate)\n[![Vercel Status](https://img.shields.io/github/deployments/thedaviddelta/lingva-translate/Production?label=vercel\u0026logo=vercel\u0026color=f5f5f5)](https://lingva.ml/)\n[![Cypress Tests](https://img.shields.io/endpoint?url=https://dashboard.cypress.io/badge/simple/qgjdyd\u0026style=flat\u0026logo=cypress)](https://dashboard.cypress.io/projects/qgjdyd/runs)\n[![License](https://img.shields.io/github/license/thedaviddelta/lingva-translate)](./LICENSE)\n[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)\n[\u003cimg src=\"https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg\" alt=\"Powered by Vercel\" height=\"20\"\u003e](https://vercel.com?utm_source=lingva-team\u0026utm_campaign=oss)\n\nAlternative front-end for Google Translate, serving as a Free and Open Source translator with over a hundred languages available\n\n\n## How does it work?\n\nInspired by projects like [NewPipe](https://github.com/TeamNewPipe/NewPipe), [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/iv-org/invidious) or [Bibliogram](https://git.sr.ht/~cadence/bibliogram), *Lingva* scrapes through Google Translate and retrieves the translation without directly accessing any Google-related service, preventing them from tracking.\n\nFor this purpose, *Lingva* is built, among others, with the following Open Source resources:\n\n+ [Lingva Scraper](https://github.com/thedaviddelta/lingva-scraper), a Google Translate scraper built and maintained specifically for this project, which obtains all kind of information from this platform.\n+ [TypeScript](https://www.typescriptlang.org/), the JavaScript superset, as the language.\n+ [React](https://reactjs.org/) as the main front-end framework.\n+ [Next.js](https://nextjs.org/) as the complementary React framework, that provides Server-Side Rendering, Static Site Generation or serverless API endpoints.\n+ [ChakraUI](https://chakra-ui.com/) for the in-component styling.\n+ [Jest](https://jestjs.io/), [Testing Library](https://testing-library.com/) \u0026 [Cypress](https://www.cypress.io/) for unit, integration \u0026 E2E testing.\n+ [Apollo Server](https://www.apollographql.com/docs/apollo-server/) for handling the GraphQL endpoint.\n+ [Inkscape](https://inkscape.org/) for designing both the logo and the banner.\n\n\n## Deployment\n\nAs *Lingva* is a [Next.js](https://nextjs.org/) project you can deploy your own instance anywhere Next is supported.\n\nThe only requirement is to set an environment variable called `NEXT_PUBLIC_SITE_DOMAIN` with the domain you're deploying the instance under. This is used for the canonical URL and the meta tags.\n\nOptionally, there are other environment variables available:\n+ `NEXT_PUBLIC_FORCE_DEFAULT_THEME`: Force a certain theme over the system preference set by the user. The accepted values are `light` and `dark`.\n+ `NEXT_PUBLIC_DEFAULT_SOURCE_LANG`: Set an initial *source* language instead of the default `auto`.\n+ `NEXT_PUBLIC_DEFAULT_TARGET_LANG`: Set an initial *target* language instead of the default `en`.\n\n### Docker\n\nAn [official Docker image](https://hub.docker.com/r/thedaviddelta/lingva-translate) is available to ease the deployment using Compose, Kubernetes or similar technologies. Remember to also include the environment variables (simplified to `site_domain`, `force_default_theme`, `default_source_lang` and `default_target_lang`) when running the container.\n\n#### Docker Compose:\n\n```\nversion: '3'\n\nservices:\n\n  lingva:\n    container_name: lingva\n    image: thedaviddelta/lingva-translate:latest\n    restart: unless-stopped\n    environment:\n      - site_domain=lingva.ml\n      - force_default_theme=light\n      - default_source_lang=auto\n      - default_target_lang=en\n    ports:\n      - 3000:3000\n```\n\n#### Docker Run\n\n```bash\ndocker run -p 3000:3000 -e site_domain=lingva.ml -e force_default_theme=light -e default_source_lang=auto -e default_target_lang=en thedaviddelta/lingva-translate:latest\n```\n\n### Vercel\n\nAnother easy way is to use the Next.js creators' own platform, [Vercel](https://vercel.com/), where you can deploy it for free with the following button.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fthedaviddelta%2Flingva-translate%2Ftree%2Fmain\u0026env=NEXT_PUBLIC_SITE_DOMAIN\u0026envDescription=Your%20domain\u0026utm_source=lingva-team\u0026utm_campaign=oss)\n\n\n## Instances\n\nThese are the currently known *Lingva* instances. Feel free to make a Pull Request including yours (please remember to add `[skip ci]` to the last commit).\n\n| Domain                                                                      | Hosting                                   | SSL Provider                                                                                    |\n|:---------------------------------------------------------------------------:|:-----------------------------------------:|:-----------------------------------------------------------------------------------------------:|\n| [lingva.ml](https://lingva.ml/) (Official)                                  | [Vercel](https://vercel.com/)             | [Let's Encrypt](https://www.ssllabs.com/ssltest/analyze.html?d=lingva.ml)                       |\n| [translate.igna.wtf](https://translate.igna.wtf/)                           | [Vercel](https://vercel.com/)             | [Let's Encrypt](https://www.ssllabs.com/ssltest/analyze.html?d=translate.igna.wtf)              |\n| [translate.plausibility.cloud](https://translate.plausibility.cloud/)       | [Hetzner](https://hetzner.com/)           | [Let's Encrypt](https://www.ssllabs.com/ssltest/analyze.html?d=translate.plausibility.cloud)    |\n| [lingva.lunar.icu](https://lingva.lunar.icu/)                               | [Lansol](https://lansol.de/)              | [Cloudflare](https://www.ssllabs.com/ssltest/analyze.html?d=lingva.lunar.icu)                   |\n| [translate.projectsegfau.lt](https://translate.projectsegfau.lt/)           | Self-hosted                               | [Let's Encrypt](https://www.ssllabs.com/ssltest/analyze.html?d=translate.projectsegfau.lt)      |\n| [translate.dr460nf1r3.org](https://translate.dr460nf1r3.org/)               | [Netcup](https://netcup.eu/)              | [Cloudflare](https://www.ssllabs.com/ssltest/analyze.html?d=translate.dr460nf1r3.org)           |\n| [lingva.garudalinux.org](https://lingva.garudalinux.org/)                   | [Hetzner](https://hetzner.com/)           | [Cloudflare](https://www.ssllabs.com/ssltest/analyze.html?d=lingva.garudalinux.org)             |\n| [translate.jae.fi](https://translate.jae.fi/)                               | Self-hosted                               | [Let's Encrypt](https://www.ssllabs.com/ssltest/analyze.html?d=translate.jae.fi)                |\n\n\n## Public APIs\n\nNearly all the *Lingva* instances should supply a pair of public developer APIs: a RESTful one and a GraphQL one.\n\n*Note: both APIs return the translation audio as a `Uint8Array` (served as `number[]` in JSON and `[Int]` in GraphQL) with the contents of the audio buffer.*\n\n### REST API v1\n\n+ GET `/api/v1/:source/:target/:query`\n```typescript\n{\n    translation: string\n    info?: TranslationInfo\n}\n```\n\n+ GET `/api/v1/audio/:lang/:query`\n```typescript\n{\n    audio: number[]\n}\n```\n\n+ GET `/api/v1/languages/?:(source|target)`\n```typescript\n{\n    languages: [\n        {\n            code: string,\n            name: string\n        }\n    ]\n}\n```\n\nIn addition, every endpoint can return an error message with the following structure instead.\n```typescript\n{\n    error: string\n}\n```\n\n### GraphQL API\n\n+ `/api/graphql`\n```graphql\nquery {\n    translation(source: String target: String query: String!) {\n        source: {\n            lang: {\n                code: String!\n                name: String!\n            }\n            text: String!\n            audio: [Int]!\n            detected: {\n                code: String\n                name: String\n            }\n            typo: String\n            pronunciation: String\n            definitions: {\n                type: String\n                list: {\n                    definition: String\n                    example: String\n                    field: String\n                    synonyms: [String]\n                }\n            }\n            examples: [String]\n            similar: [String]\n        }\n        target: {\n            lang: {\n                code: String!\n                name: String!\n            }\n            text: String!\n            audio: [Int]!\n            pronunciation: String\n            extraTranslations: {\n                type: String\n                list: {\n                    word: String\n                    article: String\n                    frequency: Int\n                    meanings: [String]\n                }\n            }\n        }\n    }\n    audio(lang: String! query: String!) {\n        lang: {\n            code: String!\n            name: String!\n        }\n        text: String!\n        audio: [Int]!\n    }\n    languages(type: SOURCE|TARGET) {\n        code: String!\n        name: String!\n    }\n}\n```\n\n\n## Related projects\n\n+ [Lingva Scraper](https://github.com/thedaviddelta/lingva-scraper) - Google Translate scraper built and maintained specifically for this project\n+ [SimplyTranslate](https://codeberg.org/SimpleWeb/SimplyTranslate-Web) - Very simple translation front-end with multi-engine support\n+ [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) - FOSS translation service that uses the open [Argos](https://github.com/argosopentech/argos-translate) engine\n+ [Lentil for Android](https://github.com/yaxarat/lingvaandroid) - Unofficial native client for Android that uses Lingva's public API\n+ [Arna Translate](https://github.com/MahanRahmati/translate) - Unofficial cross-platform native client that uses Lingva's public API\n+ [Translate-UT](https://github.com/walking-octopus/translate-ut) - Unofficial native client for Ubuntu Touch that uses Lingva's public API\n\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://thedaviddelta.com/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6679900?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDavid\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#a11y-TheDavidDelta\" title=\"Accessibility\"\u003e️️️️♿️\u003c/a\u003e \u003ca href=\"https://github.com/TheDavidDelta/lingva-translate/commits?author=TheDavidDelta\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/TheDavidDelta/lingva-translate/commits?author=TheDavidDelta\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#design-TheDavidDelta\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"https://github.com/TheDavidDelta/lingva-translate/commits?author=TheDavidDelta\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/mhmdanas\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/32234660?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMohammed Anas\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/TheDavidDelta/lingva-translate/commits?author=mhmdanas\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://PussTheCat.org/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/47571719?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTheFrenchGhosty\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/TheDavidDelta/lingva-translate/commits?author=TheFrenchGhosty\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n\n## License\n\n[![](https://www.gnu.org/graphics/agplv3-with-text-162x68.png)](https://www.gnu.org/licenses/agpl-3.0.html)\n\nCopyright © 2021 [thedaviddelta](https://github.com/thedaviddelta) \u0026 contributors.  \nThis project is [GNU AGPLv3](./LICENSE) licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheDavidDelta%2Flingva-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheDavidDelta%2Flingva-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheDavidDelta%2Flingva-translate/lists"}