有没有办法在没有插件的情况下更改 WordPress 中的语言?

Is there a way to change the language in WordPress without plugins?

我有一个动态的 WordPress 网站,我想以多种语言提供它,我搜索了一种无需插件即可添加更改语言功能的方法,但没有找到。

当我像这样在 link 中添加 ?hl=en or ?hl=en 时,有没有办法改变网站的语言?

https://www.example.com/?hl=en
https://www.example.com/?hl=fr

使用php

谢谢

不,目前没有插件、其他 third-party 工具或大量自定义开发的方法来完成此操作。它不在框架的范围内。但是,您有什么理由不想使用插件吗?有很多很棒的选择,很多都是免费的。如果您看到下面的 link,我的报价中列出的那些免费选项包括一个 link 到插件以便于访问。

From the documentation:

WordPress does not support a bilingual or multilingual blog out-of-the-box. There are however Plugins developed by the WordPress community which will allow you to create a multilingual blog easily.

Creating a mulitlingual blog is basically installing WordPress in more than one language and letting the Plugin switch between them. This includes installing .mo languages files which most Plugins will require you to do manually. See Installing WordPress in Your Language for details.

The free WPGlobus, Polylang, qTranslate-X, xili-language or Sublanguage plugins are installable on standalone WordPress sites. For multisite WordPress (one website per language), you can try Multisite Language Switcher, Zanto or Multilingual Press or purchase WPML.

请按照以下步骤操作:

  1. 登录到您的 WordPress 仪表板并转到设置>>常规。
  2. 在网站语言下拉列表中,select您要使用的语言。
  3. 点击保存更改。