Index: unk/.gitignore
===================================================================
--- /trunk/.gitignore	(revision 72)
+++ 	(revision )
@@ -1,2 +1,0 @@
-/mai
-*.gz
Index: unk/HISTORY.md
===================================================================
--- /trunk/HISTORY.md	(revision 72)
+++ 	(revision )
@@ -1,13 +1,0 @@
-## 2021
-[SimplyTranslate](https://codeberg.org/SimpleWeb/SimplyTranslate-Web) was founded by metalune and fattalion. 
-It was written in Python and used the Quart framework.
-
-## 2022
-fattalion created a Go implementation.
-
-## 2023
-* Both metalune and fattalion retired, and they handed SimplyTranslate over to [ManeraKai](https://manerakai.com).
-* Arya K. from [~vern](https://vern.cc) made a hard-fork named [Mozhi](https://codeberg.org/aryak/mozhi) and has vastly refactored it.
-
-## 2024 
-Izuru Yakumo took interest in SimplyTranslate and decided to fork it in October 2023, and in January he turned it into a hard-fork, eventually renaming it to "Mai", after a character from the fifth [Touhou Project](https://en.touhouwiki.net/wiki/Touhou_Project) game, [Mai](https://en.touhouwiki.net/wiki/Mai).
Index: unk/Makefile
===================================================================
--- /trunk/Makefile	(revision 72)
+++ 	(revision )
@@ -1,20 +1,0 @@
-GO ?= go
-PREFIX ?= /usr/local
-GOFLAGS ?= -v -ldflags "-w -X `${GO} list`.Version=${VERSION}"
-VERSION ?= 2025.04.17
-
-build:
-	${GO} build ${GOFLAGS} ./cmd/mai
-clean:
-	rm -f mai
-install:
-	install -Dm0755 mai ${DESTDIR}${PREFIX}/bin/mai
-	mkdir -p ${DESTDIR}${PREFIX}/share/mai
-	cp -R static views ${DESTDIR}${PREFIX}/share/mai
-	mkdir -p ${DESTDIR}${PREFIX}/share/man/man1 ${DESTDIR}${PREFIX}/share/man/man5
-	install -Dm0644 mai.1 ${DESTDIR}${PREFIX}/share/man/man1/mai.1
-	install -Dm0644 mai.ini.5 ${DESTDIR}${PREFIX}/share/man/man5/mai.ini.5
-uninstall:
-	rm -f ${DESTDIR}${PREFIX}/bin/mai
-	rm -rf ${DESTDIR}${PREFIX}/share/mai
-	rm -f ${DESTDIR}${PREFIX}/share/man/man1/mai.1 ${DESTDIR}${PREFIX}/share/man/man5/mai.ini.5
Index: /trunk/README.md
===================================================================
--- /trunk/README.md	(revision 72)
+++ /trunk/README.md	(revision 1)
@@ -1,14 +1,17 @@
-## Mai
-A privacy friendly frontend to multiple translation engines.
+## SimplyTranslate Engines
 
-* [How to install](INSTALL.md)
-* [List of instances](INSTANCES.md)
-* [Legal notice](LEGAL.md)
+The core part of SimplyTranslate that actually gets the data from translation websites.
 
-### Other projects
-* [Mozhi](https://codeberg.org/aryak/mozhi), also a fork of SimplyTranslate
+Note that this is a work-in-progress rewrite of https://codeberg.org/SimpleWeb/SimplyTranslate-Engines in Go. Much work remains until this rewrite will replace the original Python repository.
 
-### Credits
-* SimpleWeb (fattalion, ManeraKai, metalune)
-* [VnPower](https://vnpower.exozy.me) ([PixivFE](https://codeberg.org/VnPower/PixivFE) developer), for most of the stuff I borrowed from his project, as we both use [Fiber](https://gofiber.io)
-* [z3bra](http://z3bra.org), for the `.ini` loading function, and privilege dropping from [Partage](http://z3bra.org/partage/)
+### License
+
+SimplyTranslate Engines is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
Index: unk/doc.go
===================================================================
--- /trunk/doc.go	(revision 72)
+++ 	(revision )
@@ -1,5 +1,0 @@
-// Package mai is an usable frontend for popular translation engines
-// Originally based on SimplyTranslate, and took inspiration from the following projects:
-// Partage, PixivFE, etc.
-// For more information see mai(1) mai.ini(5)
-package mai
Index: /trunk/go.mod
===================================================================
--- /trunk/go.mod	(revision 72)
+++ /trunk/go.mod	(revision 1)
@@ -1,31 +1,10 @@
-module mahou-no-mori.yakumo.dev/mai
+module codeberg.org/Simple-Web/simplytranslate_engines_go
 
-go 1.20
+go 1.18
+
+require github.com/PuerkitoBio/goquery v1.8.0
 
 require (
-	github.com/PuerkitoBio/goquery v1.8.1
-	github.com/gofiber/fiber/v2 v2.52.0
-	github.com/gofiber/template/html/v2 v2.0.5
-	gopkg.in/ini.v1 v1.67.0
+	github.com/andybalholm/cascadia v1.3.1 // indirect
+	golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
 )
-
-require (
-	github.com/andybalholm/brotli v1.0.5 // indirect
-	github.com/andybalholm/cascadia v1.3.1 // indirect
-	github.com/gofiber/template v1.8.2 // indirect
-	github.com/gofiber/utils v1.1.0 // indirect
-	github.com/google/uuid v1.5.0 // indirect
-	github.com/klauspost/compress v1.17.0 // indirect
-	github.com/mattn/go-colorable v0.1.13 // indirect
-	github.com/mattn/go-isatty v0.0.20 // indirect
-	github.com/mattn/go-runewidth v0.0.15 // indirect
-	github.com/philhofer/fwd v1.1.2 // indirect
-	github.com/rivo/uniseg v0.2.0 // indirect
-	github.com/stretchr/testify v1.8.4 // indirect
-	github.com/tinylib/msgp v1.1.8 // indirect
-	github.com/valyala/bytebufferpool v1.0.0 // indirect
-	github.com/valyala/fasthttp v1.51.0 // indirect
-	github.com/valyala/tcplisten v1.0.0 // indirect
-	golang.org/x/net v0.17.0 // indirect
-	golang.org/x/sys v0.15.0 // indirect
-)
Index: /trunk/go.sum
===================================================================
--- /trunk/go.sum	(revision 72)
+++ /trunk/go.sum	(revision 1)
@@ -1,87 +1,12 @@
-github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM=
-github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ=
-github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
-github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
+github.com/PuerkitoBio/goquery v1.8.0 h1:PJTF7AmFCFKk1N6V6jmKfrNH9tV5pNE6lZMkG0gta/U=
+github.com/PuerkitoBio/goquery v1.8.0/go.mod h1:ypIiRMtY7COPGk+I/YbZLbxsxn9g5ejnI2HSMtkjZvI=
 github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c=
 github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/gofiber/fiber/v2 v2.52.0 h1:S+qXi7y+/Pgvqq4DrSmREGiFwtB7Bu6+QFLuIHYw/UE=
-github.com/gofiber/fiber/v2 v2.52.0/go.mod h1:KEOE+cXMhXG0zHc9d8+E38hoX+ZN7bhOtgeF2oT6jrQ=
-github.com/gofiber/template v1.8.2 h1:PIv9s/7Uq6m+Fm2MDNd20pAFFKt5wWs7ZBd8iV9pWwk=
-github.com/gofiber/template v1.8.2/go.mod h1:bs/2n0pSNPOkRa5VJ8zTIvedcI/lEYxzV3+YPXdBvq8=
-github.com/gofiber/template/html/v2 v2.0.5 h1:BKLJ6Qr940NjntbGmpO3zVa4nFNGDCi/IfUiDB9OC20=
-github.com/gofiber/template/html/v2 v2.0.5/go.mod h1:RCF14eLeQDCSUPp0IGc2wbSSDv6yt+V54XB/+Unz+LM=
-github.com/gofiber/utils v1.1.0 h1:vdEBpn7AzIUJRhe+CiTOJdUcTg4Q9RK+pEa0KPbLdrM=
-github.com/gofiber/utils v1.1.0/go.mod h1:poZpsnhBykfnY1Mc0KeEa6mSHrS3dV0+oBWyeQmb2e0=
-github.com/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU=
-github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM=
-github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
-github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
-github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
-github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
-github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
-github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U=
-github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw=
-github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
-github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
-github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0=
-github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
-github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
-github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
-github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
-golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
-golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
-golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
+golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
 golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
-golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
-golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
-golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
 golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
-golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
-gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Index: /trunk/google_translate_engine.go
===================================================================
--- /trunk/google_translate_engine.go	(revision 1)
+++ /trunk/google_translate_engine.go	(revision 1)
@@ -0,0 +1,131 @@
+package simplytranslate_engines
+
+import (
+	"fmt"
+	"net/http"
+	"net/url"
+
+	"github.com/PuerkitoBio/goquery"
+)
+
+type GoogleTranslateEngine struct{}
+
+func (_ *GoogleTranslateEngine) InternalName() string { return "google" }
+
+func (_ *GoogleTranslateEngine) DisplayName() string { return "Google" }
+
+func (_ *GoogleTranslateEngine) getLangs(type_ string) ([]Language, error) {
+	var langs_type string
+	switch type_ {
+	case "source":
+		langs_type = "sl"
+
+	case "target":
+		langs_type = "tl"
+
+	default:
+		panic(fmt.Errorf("getLangs was passed an invalid language type: %s", langs_type))
+	}
+
+	request_url, err := url.Parse("https://translate.google.com/m")
+
+	if err != nil {
+		// The URL is constant, so it should never fail.
+		panic(err)
+	}
+
+	query := url.Values{}
+	query.Add("mui", langs_type)
+	query.Add("hl", "en-US")
+	request_url.RawQuery = query.Encode()
+
+	response, err := http.Get(request_url.String())
+
+	if err != nil {
+		return nil, err
+	}
+
+	defer response.Body.Close()
+
+	doc, err := goquery.NewDocumentFromReader(response.Body)
+
+	if err != nil {
+		return nil, err
+	}
+
+	var langs []Language
+
+	doc.Find(".language-item").Each(func(_ int, s *goquery.Selection) {
+		a := s.Find("a").First()
+
+		href, exists := a.Attr("href")
+
+		// Shouldn't happen, but here goes.
+		if !exists {
+			return
+		}
+
+		lang_url, err := url.Parse(href)
+
+		if err != nil {
+			return
+		}
+
+		lang_code := lang_url.Query()[langs_type][0]
+
+		if lang_code == "auto" {
+			return
+		}
+
+		langs = append(langs, Language{Name: a.Text(), Code: lang_code})
+	})
+
+	return langs, nil
+}
+
+func (engine *GoogleTranslateEngine) SourceLanguages() ([]Language, error) {
+	return engine.getLangs("source")
+}
+
+func (engine *GoogleTranslateEngine) TargetLanguages() ([]Language, error) {
+	return engine.getLangs("target")
+}
+
+func (_ *GoogleTranslateEngine) SupportsAutodetect() bool { return true }
+
+func (_ *GoogleTranslateEngine) DetectLanguage(text string) (Language, error) { return Language{}, nil }
+
+func (_ *GoogleTranslateEngine) Translate(text string, from Language, to Language) (TranslationResult, error) {
+	request_url, err := url.Parse("https://translate.google.com/m")
+
+	if err != nil {
+		// The URL is constant, so it should never fail.
+		panic(err)
+	}
+
+	query := url.Values{}
+	query.Add("sl", from.Code)
+	query.Add("tl", to.Code)
+	query.Add("hl", to.Code)
+	query.Add("q", text)
+	request_url.RawQuery = query.Encode()
+
+	response, err := http.Get(request_url.String())
+
+	if err != nil {
+		return TranslationResult{}, err
+	}
+
+	defer response.Body.Close()
+
+	doc, err := goquery.NewDocumentFromReader(response.Body)
+
+	if err != nil {
+		return TranslationResult{}, err
+	}
+
+	return TranslationResult{
+		SourceLanguage: from,
+		TranslatedText: doc.Find(".result-container").Text(),
+	}, nil
+}
Index: /trunk/language.go
===================================================================
--- /trunk/language.go	(revision 1)
+++ /trunk/language.go	(revision 1)
@@ -0,0 +1,5 @@
+package simplytranslate_engines
+
+type Language struct {
+	Name, Code string
+}
Index: unk/mai.1
===================================================================
--- /trunk/mai.1	(revision 72)
+++ 	(revision )
@@ -1,34 +1,0 @@
-.Dd $Mdocdate$
-.Dt MAI 1
-.Os
-.Sh NAME
-.Nm mai
-.Nd An usable frontend for popular translation engines
-.Sh SYNOPSIS
-.Nm
-.Op Fl f Ar config-file
-.Op Fl u Ar user
-.Op Fl g Ar group
-.Sh DESCRIPTION
-This project has been forked from the remains of the
-rewrite of the SimplyTranslate project, which is currently
-maintained by ManeraKai, but as time passed, this fork
-diverged wildly, and was renamed.
-Much to anyone's dismay, this was named after
-.Lk https://en.touhouwiki.net/wiki/Mai Mai from Mystic Square
-.Sh FEATURES
-.Bl -tag -width 11n -compact
-.It Command-line tool
-See
-.Xr suwako 1
-.It Privilege dropping
-Stolen from
-.Xr partage 1
-just so you do not run this as root
-.El
-.Sh AUTHORS
-.An fattalion
-.An metalune
-.An ManeraKai Lk https://manerakai.com
-.Sh MAINTAINERS
-.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
Index: /trunk/translation_engine.go
===================================================================
--- /trunk/translation_engine.go	(revision 1)
+++ /trunk/translation_engine.go	(revision 1)
@@ -0,0 +1,16 @@
+package simplytranslate_engines
+
+type TranslationResult struct {
+	SourceLanguage Language
+	TranslatedText string
+}
+
+type TranslationEngine interface {
+	InternalName() string
+	DisplayName() string
+	SourceLanguages() ([]Language, error)
+	TargetLanguages() ([]Language, error)
+	Translate(text string, from Language, to Language) (TranslationResult, error)
+	SupportsAutodetect() bool
+	DetectLanguage(text string) (Language, error)
+}
Index: unk/version.go
===================================================================
--- /trunk/version.go	(revision 72)
+++ 	(revision )
@@ -1,15 +1,0 @@
-package mai
-
-import (
-	"fmt"
-)
-
-var (
-	// Version release version
-	Version = "0.0.1"
-)
-
-// FullVersion display the full version and build
-func FullVersion() string {
-	return fmt.Sprintf("%s", Version)
-}
