wordpress翻译_如何使用TranslatePress轻松翻译WordPress

本文介绍了如何使用TranslatePress插件方便地翻译WordPress网站。TranslatePress允许实时编辑翻译,简化了多语言网站的内容转换,避免了机器翻译的不准确。文章详细讲解了设置和使用TranslatePress的步骤,包括为何选择该插件、如何安装、配置插件以及添加语言切换器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

wordpress翻译

Did you know that you can install and use WordPress in multiple languages? Yes, you can even create a multilingual website with WordPress by translating your content into different languages. In this article, we will show you how to easily translate your WordPress with TranslatePress.

您是否知道可以使用多种语言安装和使用WordPress? 是的,您甚至可以通过将内容翻译成不同的语言来使用WordPress创建多语言网站。 在本文中,我们将向您展示如何使用TranslatePress轻松翻译WordPress。

How to translate your WordPress site with TranslatePress
为什么要使用TranslatePress来翻译WordPress网站 (Why Use TranslatePress for Translating a WordPress Website)

The best part about WordPress is that it can be used in any language. Most WordPress themes and plugins can also be used and translated into any language as well.

关于WordPress最好的部分是它可以以任何语言使用 。 大多数WordPress主题和插件也可以使用,也可以翻译成任何语言。

If your business website have a multilingual audience, then it can be very beneficial to translate your content.

如果您的企业网站具有多种语言的受众,那么翻译您的内容可能会非常有益。

You can use machine translations like Google Translate, but these translations are not good and sometimes can be quite misleading.

您可以使用机器翻译,例如Google Translate ,但这些翻译效果不好,有时可能会引起误解。

On the other hand, if you’re using a multilingual WordPress plugin, then you need to create multiple posts which requires switching back and forth between different languages.

另一方面,如果您使用的是多语言WordPress插件 ,则需要创建多个帖子,这需要在不同语言之间来回切换。

TranslatePress is a WordPress translation plugin that helps you solve all these problems.

TranslatePress是一个WordPress翻译插件,可以帮助您解决所有这些问题。

  • You can translate your website and content using a live editor with the actual preview of each page on your site

    您可以使用实时编辑器来翻译网站和内容,以及网站上每个页面的实际预览
  • You can instantly switch languages from the live editor.

    您可以从实时编辑器立即切换语言。
  • Translate your theme, content, and plugins easily using the same interface.

    使用相同的界面轻松转换主题,内容和插件。
  • Use Google Translate for automatic translations and only edit the parts that don’t make sense.

    使用Google翻译进行自动翻译,并仅编辑没有意义的部分。

Let’s take a look at how to easily translate your WordPress website with TranslatePress.

让我们看一下如何使用TranslatePress轻松翻译WordPress网站。

用TranslatePress翻译WordPress (Translating WordPress with TranslatePress)

The first thing you need to do is install and activate the TranslatePress plugin. For more details, see our step by step guide on how to install a WordPress plugin.

您需要做的第一件事是安装并激活TranslatePress插件。 有关更多详细信息,请参阅有关如何安装WordPress插件的分步指南。

If you want to translate your website to more than one language, then you will also need to install ‘Extra Languages’ add-on. You can do this from the download addons button under your account on TranslatePress website.

如果您想将网站翻译成多种语言,则还需要安装“其他语言”附加组件。 您可以通过TranslatePress网站上您帐户下的下载插件按钮来执行此操作。

Download addons

After downloading the add-on, you can install and activate it like any other WordPress plugin.

下载附件后,您可以像安装其他任何WordPress插件一样安装并激活它。

Upon activation, you need to visit Settings » TranslatePress page to configure plugin settings.

激活后,您需要访问设置»TranslatePress页面来配置插件设置。

Add license

First, you need to switch to the license tab and enter your license key. You can find this information under your account on the TranslatePress website.

首先,您需要切换到许可证选项卡并输入许可证密钥。 您可以在TranslatePress网站上的帐户下找到此信息。

After that, you need to switch to the General settings tab to setup other settings.

之后,您需要切换到“常规设置”选项卡以设置其他设置。

TranslatePress settings

The first option on the page is to choose the default language of your website, and the languages you want to translate your website into.

页面上的第一个选项是选择网站的默认语言以及要将网站翻译成的语言。

Next, you need to choose whether you want to display language names in the native language. The default option is ‘No’ which means language names will be shown in the default language.

接下来,您需要选择是否要以母语显示语言名称。 默认选项为“否”,这意味着语言名称将以默认语言显示。

The next option is to choose whether you want to display the default language name in the URL as a subdirectory. For example, http://example.com/en/.

下一个选项是选择是否要在URL中将默认语言名称显示为子目录。 例如,http://example.com/en/。

The default choice is no which means only the other languages will have the language name in URL as a subdirectory. We recommend leaving this setting as-is for best SEO.

默认选择是“否”,这意味着只有其他语言会将URL中的语言名称作为子目录。 我们建议按原样保留此设置,以获得最佳SEO。

TranslatePress settings

This brings you to the next setting, ‘Force language in custom links’. The default option is ‘Yes’, because that will change custom links for translated languages making the URLs more SEO friendly.

这将带您进入下一个设置,“自定义链接中的强制语言”。 默认选项是“是”,因为这将更改翻译语言的自定义链接,从而使URL对SEO更友好。

Next, you need to choose whether you want to use Google Translate for automatic translations. The default choice is ‘No’, but you can change that if you would like to use Google Translate.

接下来,您需要选择是否要使用Google翻译进行自动翻译。 默认选择为“否”,但是如果您想使用Google翻译,则可以更改它。

You will need to provide a Google Translate API key in the next option. You will find a link under the option which will show you instructions on how to get one.

您需要在下一个选项中提供Google Translate API密钥。 您会在该选项下找到一个链接,该链接将向您显示如何获得链接的说明。

Finally, you will come to the options on how you want to display the language switcher on your website. TranslatePress provides you with three choices.

最后,您将找到有关如何在网站上显示语言切换器的选项。 TranslatePress为您提供三种选择。

You can use a shortcode, add switcher to your navigation menu, or display a floating menu. We will show you how to add the language switcher to your website later in this article.

您可以使用简码 ,将切换器添加到导航菜单或显示浮动菜单。 本文稍后将向您展示如何将语言切换器添加到您的网站。

Go ahead and click on the ‘Save Changes’ button to store your settings.

继续并单击“保存更改”按钮以存储您的设置。

翻译您的网站内容 (Translating Your Website Content)

To translate your website, you can simply click on the ‘Translate Site’ tab on plugin’s settings page or the button in your WordPress admin bar.

要翻译您的网站,您只需点击插件设置页面上的“翻译网站”标签或WordPress管理栏中的按钮。

Translate site button

This will open the live translation editor in a new browser tab.

这将在新的浏览器选项卡中打开实时翻译编辑器。

In this live editor, you can click on any text on your website in the right pane and TranslatePress will load it in the left column to translate.

在此实时编辑器中,您可以在网站的右窗格中单击任何文本,然后TranslatePress会将其加载到左栏中以进行翻译。

Translating site in TranslatePress

Now click on the language you want to translate the string into and then provide your translation.

现在,单击您想要将字符串翻译成的语言,然后提供翻译。

After entering the translation, click on the ‘Save Translation’ button on the top and then click on the next button. TranslatePress will automatically load the next string on the page for you to translate.

输入翻译后,单击顶部的“保存翻译”按钮,然后单击下一步。 TranslatePress将自动在页面上加载下一个字符串供您翻译。

You can also just click on the drop-down menu below your default language, and it will show you the list of translatable text strings on the page. You can select a string and then provide its translation.

您也可以单击默认语言下方的下拉菜单,这将在页面上显示可翻译文本字符串的列表。 您可以选择一个字符串,然后提供其翻译。

Select and translate strings on a page

You can translate all content on any page. This includes navigation menus, buttons, sidebar widgets, meta text, and more.

您可以翻译任何页面上的所有内容。 这包括导航菜单,按钮,侧栏小部件,元文本等。

You can also visit any page by clicking on the links on the screen and start translating that page.

您也可以通过单击屏幕上的链接并开始翻译该页面来访问任何页面。

TranslatePress allows you to instantly start translating any page or post on your site when logged in. Simply click on the ‘Translate Page’ button on the top to enter the live editor.

TranslatePress允许您登录后立即开始翻译您网站上的任何页面或帖子。只需单击顶部的“翻译页面”按钮即可进入实时编辑器。

Start translating any page

Once you have translated a string, the plugin will automatically translate it for you on other places. For example, if you translated a post title, then the post title in your sidebar widgets will be automatically translated.

翻译完字符串后,插件会自动在其他地方为您翻译。 例如,如果您翻译了帖子标题,则侧边栏小部件中的帖子标题将被自动翻译。

将语言切换器添加到您的网站 (Adding Language Switcher to Your Website)

Language switcher allows your website visitors to select a language when they visit your website. It usually displays the flag of each country to indicate languages available on your site.

语言切换器使您的网站访问者在访问您的网站时可以选择一种语言。 它通常显示每个国家/地区的标志,以指示您网站上可用的语言。

TranslatePress allows you to add language switcher by using a shortcode, as a navigation menu item, or as a floating banner. The language switcher can be displayed as flags, language names, or both.

TranslatePress允许您通过使用简码,导航菜单项或浮动横幅来添加语言切换器。 语言切换器可以显示为标志,语言名称或同时显示。

Adding language switcher in WordPress using shortcode

使用简码在WordPress中添加语言切换器

You just need to add [language-switcher] shortcode to posts, pages, or a sidebar widget where you want to display the language switcher.

您只需要在要显示语言切换器的帖子,页面或侧边栏小部件中添加[language-switcher]短代码。

Shortcode switcher

Adding language switcher to your WordPress navigation menu

将语言切换器添加到WordPress导航菜单

Simply go to Appearance » Menus page and click on the ‘Language Switcher’ tab in the left column. Now select the languages you want to display and then click on add to menu button.

只需转到外观»菜单页面,然后单击左列中的“语言切换器”标签。 现在选择您要显示的语言,然后单击添加到菜单按钮。

Adding language switcher to WordPress navigation menus

You will now see languages added to your WordPress navigation menu. Don’t forget to click on the ‘Save Menu’ button to store your changes.

现在,您将看到添加到WordPress导航菜单中的语言。 不要忘记单击“保存菜单”按钮来存储您的更改。

This is how it looked on our test site:

这是在我们的测试站点上的外观:

Language switcher in navigation menu

Adding a floating language switcher

添加浮动语言切换器

Go to plugin’s settings page and scroll down to language switcher section. From here make sure the box next to the ‘Floating language selection’ option is checked.

转到插件的设置页面,然后向下滚动至语言切换器部分。 从此处确保选中“浮动语言选择”选项旁边的框。

Floating language switcher

Don’t forget to click on the save changes button to store your settings.

不要忘记单击“保存更改”按钮来存储您的设置。

You can now visit your website to see the floating language switcher at the bottom of every page on your website.

现在,您可以访问您的网站,以在网站上每个页面的底部看到浮动语言切换器。

Floating language switcher

We hope this article helped you learn how to translate your WordPress site with TranslatePress. You may also want to see our list of the best WordPress plugins for business websites.

我们希望本文能帮助您学习如何使用TranslatePress翻译WordPress网站。 您可能还想查看我们用于商业网站最佳WordPress插件列表。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/plugins/how-to-easily-translate-your-wordpress-with-translatepress/

wordpress翻译

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值