Dialect：Linux 下的开源翻译应用
翻译

> 
> Dialect 是一个简单明了的应用，可以让你使用 Web 服务进行语言间的翻译。想要了解更多的话，让我们来一窥究竟。
> 
> 
> 


![](/data/attachment/album/202110/10/115724t5xgx8agu8asag0u.jpg)


虽然你可以启动 Web 浏览器并直接使用任何翻译服务来完成工作，但桌面应用有时会派上用场。


Dialect 是一个简单的翻译应用，可以利用 Web 服务进行翻译，同时给你一些额外的能力。


### 使用谷歌翻译和 LibreTranslate 的开源翻译应用


![](/data/attachment/album/202110/10/115731zqpkk7zddoce733k.png)


Dialect 是一个主要为 GNOME 桌面定制的应用，但它在其他桌面环境下也应该能正常工作。


它可以让你快速翻译语言，同时还有一些额外的选项。


在其核心部分，你可以选择谷歌翻译或 LibreTranslate 翻译服务。


尽管 LibreTranslate 达不到谷歌翻译的准确性，但把它作为一个选项来切换是一个很好的补充。至少，对于一些基本的用法，如果用户不想利用谷歌的服务，你的桌面上就有一个备选方案。


### Dialect 的特点


![](/data/attachment/album/202110/10/115731fbze0k0a5zuaakka.png)


除了切换翻译服务外，你还能得到如下个功能：


* 发音
* 文本到语音（TTS）功能（谷歌）
* 黑暗模式
* 翻译快捷方式
* 实时翻译
* 剪贴板按钮可快速复制/粘贴
* 翻译历史（撤销/重做）


正如你在截图中所注意到的，实时翻译功能可能会因为滥用 API 而使你的 IP 地址被禁止使用服务。


![](/data/attachment/album/202110/10/115731lh3jso3z9vv99xv1.png)


我试着使用 LibreTranslate（如上图所示）和谷歌翻译，并启用实时翻译功能，它工作得很好。


也许，如果你经常依赖翻译，你可能想避免这个实时翻译。但是，对于我的临时使用，在相当多的测试中，该服务并没有导致 IP 地址被禁止。


重要的是要注意，如果你想，你可以指定一个自定义的 LibreTranslate 实例。默认情况下，它使用 “[translate.astian.org](http://translate.astian.org)” 作为实例。


你可能找不到一个单独显示的翻译历史区域，但窗口左上角的箭头按钮会让你看到你以前的翻译，以及翻译设置。


所以，它也可以作为一个重做/撤销的功能。


### 在 Linux 中安装 Dialect


[Dialect](https://flathub.org/apps/details/com.github.gi_lom.dialect) 是以 [Flatpak](https://itsfoss.com/what-is-flatpak/) 的形式提供的。所以，你应该能够在你选择的任何 Linux 发行版上安装它。如果你是新手，你可能想看看我们的 [Flatpak 指南](https://itsfoss.com/flatpak-guide/) 以获得帮助。


首先，添加 Flathub 仓库：



```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

```

然后安装应用：



```
flatpak install flathub com.github.gi_lom.dialect

```

安装后，在系统菜单中寻找它，并从那里启动它。


你也可以浏览它的 [GitHub 页面](https://github.com/dialect-app/dialect/) 了解更多信息。




---


via: <https://itsfoss.com/dialect/>


作者：[Ankush Das](https://itsfoss.com/author/ankush/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
**Brief:** Dialect is a straightforward app that lets you translate between languages using web services. To explore more, let us take a closer look.

While you can launch the web browser and directly use any translation service to get the job done, a desktop app can sometimes come in handy.

Dialect is a simple translation app that utilizes web services to translate while giving you some extra abilities.

## Open-Source Translation App with Google Translate & LibreTranslate

![dialect screenshot](https://itsfoss.com/content/images/wordpress/2021/09/dialect-screenshot.png)

Dialect is primarily an app tailored for GNOME desktops, but it should work fine with other desktop environments.

It lets you quickly translate languages along with a few extra options.

At its core, it lets you choose between Google Translate or LibreTranslate as the translation service.

Even though LibreTranslate cannot come close to Google Translate’s accuracy, featuring it as an option to switch is an excellent addition. At least, for some basic usage, if a user does not want to utilize Google’s services, you have an alternative ready on your desktop.

## Features of Dialect

![dialect app options](https://itsfoss.com/content/images/wordpress/2021/09/dialect-app-options.png)

Along with the ability to switch translation services, you get a few more tweaks:

- Pronunciation
- Text to Speech functionality (Google)
- Dark mode
- Translation shortcut
- Live Translation
- Clipboard buttons to quickly copy/paste
- Translation history (undo/redo)

As you can notice in the screenshot, the live translation feature may get your IP addressed banned from using the service because of API abuse.

![dialect libretranslate](https://itsfoss.com/content/images/wordpress/2021/09/dialect-libretranslate.png)

I tried using LibreTranslate (as shown in the image above) and Google Translate with the live translation feature enabled, and it worked fine.

Maybe if you rely on translations quite often, you may want to avoid the feature. But, for my quick usage, the services didn’t ban by IP address for quite a few test runs.

It is important to note that you can specify a custom LibreTranslate instance if you want. By default, it uses “translate.astian.org” as the instance.

You may not find a separate translation history section, but the arrow buttons in the top-left corner of the window will let you see your previous translations and the translation settings as well.

So, it works as a redo/undo feature as well.

## Installing Dialect in Linux

Dialect is available as a [Flatpak](https://itsfoss.com/what-is-flatpak/). So, you should be able to install it on any Linux distro of your choice. If you are new to this, you might want to check out our [Flatpak guide](https://itsfoss.com/flatpak-guide/) for help.

First, add Flathub repo:

`flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`


And then install the application:

`flatpak install flathub com.github.gi_lom.dialect`


Once installed, look for it in the system menu and start it from there.

You can also explore its [GitHub page](https://github.com/dialect-app/dialect/) for more information.