Skip to content

lloc/Multisite-Language-Switcher

Repository files navigation

Multisite Language Switcher

A simple, powerful, and user-friendly plugin that adds multilingual support to your WordPress multisite installation, whether using multiple subdomains or folders. Multisite Language Switcher allows you to effortlessly manage translations for posts, pages, custom post types, categories, tags, and custom taxonomies.

License Version Scrutinizer Code Quality PHP Version Require codecov

Where to get the plugin

Download the latest stable from the WordPress Plugin Directory, and please remember to give this plugin a five-star rating.

Please note that the version of Multisite Language Switcher on GitHub is a work in progress.

If you plan to use the GitHub repository on a server, don't forget to run composer install --no-dev.

Installation Instructions

  • Via WordPress Dashboard:

    • Go to your WordPress dashboard.
    • Navigate to Network Admin > Plugins.
    • Click on Add New Plugin.
    • Search for "Multisite Language Switcher".
    • Click Install Now and then Activate.
  • Manual Installation:

    • Download the plugin and unzip it using your preferred program.
    • Upload the entire plugin directory to your WordPress plugin directory (/wp-content/plugins).
    • Navigate to Network Admin > Plugins.
    • Click on Activate for the Multisite Language Switcher plugin.
  • Configuration:

    • After activation, navigate to Settings > Multisite Language Switcher in each blog to configure the plugin.

Features and Capabilities

  • Connect Translations for Pages and Posts:

    • Navigate to Posts > Edit or Pages > Edit to link your translated content.
  • Connect Translations for Categories and Tags:

    • Go to Posts > Categories or Posts > Tags to associate your translated categories and tags.
  • Connect Custom Post Types and Custom Taxonomies:

    • Easily manage translations across different custom post types and taxonomies.
  • Utilize Widgets, Shortcodes, and Content Filters:

    • Use the widget or the Gutenberg block.
    • Use the [sc_msls] shortcode in the classic editor.
    • Set the content filter to display a hint to users when a translation is available.
  • Optional Theme Integration:

    • Insert the following PHP code directly into your theme files to display language switcher links:
      if ( function_exists( 'the_msls' ) ) {
          the_msls();
      }

Review the Multisite Language Switcher Website for more information. Some diagrams are also available.

Acknowledgements

The plugin uses flag-icons from FamFamFam. Thanks to Mark James for his great work. In addition I would like to thank Jürgen Mayer for creating the plugin's banner.

Translators

Thanks to all translators for their great work.

You can translate this plugin on translate.wordpress.org, or if you prefer and have created your own language pack, or have an update of an existing one, you can send me your gettext PO and MO so that I can bundle it into the Multisite Language Switcher. You can download the latest POT file from here.