1
0
Fork
You've already forked mozhi
0
forked from aryak/mozhi
Mozhi is an alternative-frontend for many translation engines.
  • Go 44.2%
  • HTML 37.8%
  • CSS 11.8%
  • Python 5.4%
  • Dockerfile 0.8%
Find a file
2025年09月17日 20:13:51 +02:00
.gitea/workflows install-docker should be b4 qemu 2023年09月21日 22:05:59 +05:30
cmd add selectable engines support to web ( closes #20 ) 2024年08月27日 22:36:11 +05:30
docs how did i forget to comment my testing stuff 2024年07月20日 15:38:23 +05:30
pages Add MOZHI_DEFAULT_ENGINE env var 2025年06月22日 14:58:33 +10:00
public refactor: move select changes to style.css 2025年02月28日 14:04:07 +00:00
serve do not sanitize from/to langauge codes ( closes #58 ) 2025年01月19日 13:46:23 +05:30
utils add selectable engines support to web ( closes #20 ) 2024年08月27日 22:36:11 +05:30
views add user's preferred colourscheme as cookie ( closes #62 ) 2025年04月10日 19:20:05 +05:30
.gitignore guess i have to add docs to the repo itself 2023年08月27日 21:53:49 +05:30
compose.yml Update compose.yml 2025年04月09日 04:28:41 +00:00
Dockerfile trying to fix CI 2024年07月19日 20:25:58 +05:30
go.mod update libmozhi and other deps ( closes #63 ) 2025年04月10日 19:34:24 +05:30
go.sum update libmozhi and other deps ( closes #63 ) 2025年04月10日 19:34:24 +05:30
instances.json Remove ggtyler.dev 2025年09月17日 20:13:51 +02:00
instances2json.py instances: add non-clearnet to json, add retries 2024年09月05日 13:33:04 +05:00
LICENSE init 2023年06月25日 00:10:57 +05:30
main.go SimplyTranslate -> Mozhi + Refactor README 2023年08月27日 17:22:32 +05:30
README.md Remove ggtyler.dev 2025年09月17日 20:13:06 +02:00
TODO.md update deps 2023年11月29日 18:27:08 +05:30

[画像:Mozhi logo]

Mozhi

License: AGPLv3 Matrix

Mozhi (spelt moḻi) is an alternative-frontend for many translation engines.

It was initially made as a maintained fork/rewrite of simplytranslate, but has grown to have a lot more features as well!

I'm initially focusing on the api and engines, but eventually Mozhi will have a functioning CLI and webapp.

Supported Engines:

  • Google
  • Reverso
  • DeepL
  • LibreTranslate
  • Yandex
  • MyMemory
  • DuckDuckGo ( 1-1 with Bing Translate )

Projects that use Mozhi

  • select2translate - Translate text from your selection clipboard using Mozhi
  • Crow Translate - KDE Project written in C++ / Qt that allows you to translate and speak text using Mozhi

Where is the engine code?

The engine code has recently been split from the main codebase. Please check aryak/libmozhi for it.

Installing

You can either use docker or the build artifacts from CI jobs on git.projectsegfau.lt.

Building

GOPRIVATE=codeberg.org/aryak/libmozhi # Get latest commit since proxy server is a bit slow
go mod download
go run github.com/swaggo/swag/cmd/swag@latest init --parseDependency
go build -o mozhi

API Docs

Mozhi makes use of swagger (using the fiber middleware) to manage the documentation of the API.

You can find it in /api/swagger of any instance (example).

Why does Reverso not work?

Reverso sometimes blocks IPs of servers hosting mozhi, and since it doesn't have IPv6, an IP Rotator won't be viable. For more information, check out #27

Configuration

Features of Mozhi can be customized and toggled on/off using Environment Variables.

  • MOZHI_PORT: Port the webserver listens on (if hosting API)
  • MOZHI_LIBRETRANSLATE_URL: URL of Libretranslate instance (Example: MOZHI_LIBRETRANSLATE_URL=https://lt.psf.lt)
  • MOZHI_DEFAULT_SOURCE_LANG: Language to default to if no source language is set by user. Defaults to Auto-Detect (or first available language in engines which dont support it)
  • MOZHI_DEFAULT_PREFER_AUTODETECT: Prefer autodetect if available instead of specified/default source language. Defaults to false
  • MOZHI_DEFAULT_TARGET_LANG: Language to default to if no target language is set by user. Defaults to English
  • MOZHI_DEFAULT_ENGINE: Engine to default to if no engine is set by user. Defaults to google

These envvars turn off/on engines. By default all of them are enabled.

  • MOZHI_GOOGLE_ENABLED
  • MOZHI_REVERSO_ENABLED
  • MOZHI_DEEPL_ENABLED
  • MOZHI_LIBRETRANSLATE_ENABLED
  • MOZHI_YANDEX_ENABLED
  • MOZHI_MYMEMORY_ENABLED
  • MOZHI_DUCKDUCKGO_ENABLED

Instances

Link Cloudflare Country ISP
mozhi.aryak.me No India Airtel
translate.projectsegfau.lt No Germany / USA / India Avoro / Racknerd / Airtel
translate.nerdvpn.de No Ukraine vsys.host
mozhi.ducks.party No Germany Datalix
mozhi.pussthecat.org No Germany Hetzner
mozhi.adminforge.de No Germany Hetzner
translate.privacyredirect.com No Finland Private WebHost
mozhi.canine.tools No USA RoyaleHosting
mzh.dc09.ru No Russia TimeWeb Cloud
mozhi.franklyflawless.org No Germany Hetzner
mozhi.frontendfriendly.xyz (Tor) No USA Hetzner
mozhi.ducks.party (Tor) No Germany Datalix

Features

  • An all mode where the responses of all supported engines will be shown.
  • Autodetect which will show the language that was detected
  • Text-To-Speech for multiple engines
  • A good API (subjective :P)
  • All the stuff you expect from a translation utility :)

Etymology

Mozhi is the word in Tamil for language. Simple as that :P

Credits

  • Arya: creator
  • Midou36o: made the logo
  • py_: Design files
  • Missuo: creating gDeepLX that does the hard part of making DeepL work
  • translatepy: giving me the format of request for yandex engine
  • SimplyTranslate: Inspiration and base code for the webui
  • Rimgo: Code for embedding html in binary
  • Bnyro: Parallelization of all engines