skip to Main Content

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

2

Answers


  1. 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.

    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.

    Login or Signup to reply.
  2. Please follow the below step:

    1. Log in to your WordPress dashboard and go to Settings>>General.
    2. In the Site Language dropdown list, select the language you want to use.
    3. Click Save Changes.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search