33 lines
1.2 KiB
Markdown
33 lines
1.2 KiB
Markdown
# D Google Translate Library
|
|
|
|
[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
|
|
[](https://git.zhirov.kz/dlang/dgtl)
|
|
[](https://github.com/AlexanderZhirov/dgtl)
|
|
[](https://code.dlang.org/packages/dgtl)
|
|
[](https://www.linux.org/)
|
|
|
|
The library is a simple translator based on using an HTTP GET method request in Google Translate.
|
|
|
|
## Quick start
|
|
|
|
```d
|
|
import dgtl;
|
|
import std.stdio;
|
|
|
|
void main()
|
|
{
|
|
auto dgtl = new DGTL;
|
|
|
|
dgtl.lang.source.en;
|
|
dgtl.lang.target.de;
|
|
|
|
string text = "Text intended for translation into German";
|
|
|
|
dgtl.translate(text).writeln;
|
|
}
|
|
```
|
|
|
|
## DUB
|
|
|
|
Add a dependency on `"dgtl": "~>0.0.1"`
|