Docs
Everything needed to install the plugin, show the switcher and extend it from your own theme.
Installation
Install from the WordPress plugin directory, or with WP-CLI.
wp plugin install multilify --activateThe switcher
Use the shortcode in any post or page, or the template tag in a theme file. Pass show_name="false" for flags only.
[multilify_switcher]
<?php multilify_switcher(); ?>Filters
Translate any post type, and hook into the output where you need to.
add_filter( 'multilify_post_types', function ( $types ) {
$types[] = 'product';
return $types;
} );Every filter
Six hooks, and that is the whole surface.
multilify_post_ types - Which post types get translation panels. Add
productfor WooCommerce. multilify_translated_ title - The translated title, just before it is output.
multilify_translated_ content - The translated content, just before it is output.
multilify_flag_ choices - The flags offered in the language picker.
multilify_locale - The locale resolved for the current request.
multilify_enable_ browser_ detection - Whether a first-time visitor is sent to their browser's language.
What it will not translate
Stated plainly, because finding out after installing is worse.
Page builders that render from their own stored data, such as Elementor. Multilify translates what passes through
the_content, which covers the block editor and the classic editor.Menus and widgets. Post and page content only, for now.
WooCommerce prices, attributes and variations. Product titles and descriptions translate; the rest is WooCommerce's own data.
Requirements
Checked against the plugin directory when this page was built.
- needs WordPress
- WordPress 5.8 or later
- needs PHP
- PHP 7.4 or later
- tested up to
- WordPress 7.1.2
- license
- GPL v2 or later