I have a dynamic WordPress site , and I want to provide it in more than one language, I searched for a way to add the ability to change the language without plugins, and I did not find it.
Is there a way to make the site's language change when I add ?hl=en or ?hl=en
in the link like this?
https://www.example.com/?hl=en
https://www.example.com/?hl=fr
using php
Thanks
CodePudding user response:
No, there is not currently a way to accomplish this without plugins, other third-party tools, or significant custom development. It is outside the scope of the framework. However, is there any reason you don't want to use a plugin? There are many great options, many free. If you see the link below, those free options listed in my quote include a link to the plugins for easy access.
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.
CodePudding user response:
Please follow the below step:
- Log in to your WordPress dashboard and go to Settings>>General.
- In the Site Language dropdown list, select the language you want to use.
- Click Save Changes.