2026年11月12日
2026年11月12日
Polylang Setup Guide: Build a Free Japanese-English Multilingual Site
This article is a localized edition of the Japanese original. Read the Japanese original
Bottom line: what Polylang is and how setup works
Polylang is a plugin for building multilingual sites with WordPress (its author is Chouby). According to its wordpress.org description, it uses only WordPress's built-in mechanisms (taxonomies), so you can make a site multilingual without sacrificing performance. There is no limit on the number of languages you can add.
Setup proceeds as follows.
- Install and activate the plugin
- Add languages
- Set the URL format
- Place a language switcher
- Translate the theme's strings
This article is based on official information as of October 16, 2026. It does not cover the actual process of translating posts and pages. For that, see Polylang's official documentation (Getting started).
Free version vs. Pro
| Free (Polylang) | Pro (paid) | |
|---|---|---|
| What can be translated | Posts, pages, media, categories, tags, custom post types, custom taxonomies, RSS feeds | Same as free |
| How the language is set | A language code in the URL, or a subdomain or domain per language | Same as free |
| Language switcher | Placed as a block, a widget, or a navigation menu item | Same as free |
| Translating URL slugs | No | Yes (categories, author base, custom post types, etc.) |
| Sharing slugs across languages | No | Yes |
| Machine translation | No | Yes (DeepL; requires your own API key) |
| Exporting and importing translations | No | Yes (XLIFF format) |
| Duplicating and synchronizing content between translations | No | Yes |
| Support | Community forum | Priority support |
Note: "No" means the feature is listed officially as a Pro feature and does not appear in the free version's feature list.
- Pro costs €99 per year (excluding tax) (polylang.pro, checked October 16, 2026). It includes one year of updates and premium support. Licenses for multiple sites are also available, but the page does not state the number of sites
- WooCommerce translation is handled not by Pro but by a separately sold add-on, "Polylang for WooCommerce"
Install and activate
In the admin screen, go to Plugins > Add New, search for "Polylang," then install and activate it. With WP-CLI, use the following command.
wp plugin install polylang --activate
It has more than 900,000 active installations (wordpress.org, checked October 16, 2026).
Add languages
From the Languages menu in the admin screen, register the languages you will use with "Add new language."
- For the language code, a two-letter code conforming to ISO 639-1 is recommended (
jafor Japanese,enfor English) - Set one of the registered languages as the default language
URL settings
Choose the URL format for each language under "URL modifications" in Languages > Settings in the admin screen. The following options are available.
- The language is set from the directory name in pretty permalinks (for example, a format like
example.com/en/) - The language is set from the subdomain name in pretty permalinks
- A different domain is used for each language
There are also the following settings.
| Setting | What it does |
|---|---|
| Hide URL language information for default language | Removes the language code from URLs in the default language |
| Detect browser language | Detects the visitor's browser language on the front page |
| The front page URL contains the language code instead of the page name or page id | Uses the language code as the URL of the home page |
If you change the URL format after the site is live, the URLs in search results and bookmarks change. Decide on it before you publish.
Place the language switcher
The language switcher can be placed as a block, a widget, or a navigation menu item (wordpress.org). If you use classic menus or classic widgets with a block theme, the official page recommends also using a plugin called Site Editor Classic Features.
To write it directly into a theme template, use pll_the_languages(). However, in Polylang 3.9 and later, the legacy way of passing arguments to this function may be deprecated (according to the Polylang source code). Check the arguments in the official documentation for the version you use before relying on it.
Translate the theme’s strings
Strings written in the theme, as opposed to posts and pages, are translated under "Translations" (string translations) in the Languages menu. To register strings you want translated from a theme or plugin, use pll_register_string().
add_action( 'init', function () {
if ( ! function_exists( 'pll_register_string' ) ) {
return;
}
// 1st argument: unique name, 2nd argument: string, 3rd argument: group name
pll_register_string( 'hero_title', 'Main Title', 'mytheme' );
} );
To display a registered string, use the following functions (all as defined in the Polylang source code).
| Function | Behavior |
|---|---|
pll__( $string ) |
Returns the translated string |
pll_esc_html__( $string ) |
Returns the translated string, HTML-escaped |
pll_e( $string ) |
Outputs the translated string as is (it is not escaped) |
If the output string may contain values that come from outside, use a function that escapes it.
Get the URL of a translated post
pll_get_post() is a function that returns the post ID of the translation (not its URL). If there is no translation, it returns 0. If you need the URL, combine it with get_permalink().
$en_id = pll_get_post( get_the_ID(), 'en' );
if ( $en_id ) {
echo esc_url( get_permalink( $en_id ) );
}
How URL slugs are handled
For the end of the URL (the slug), the free version and Pro differ as follows (polylang.pro, wordpress.org).
- Free: a feature for translating URL slugs is not included in the feature list
- Pro: supports translating URL slugs for categories, the author base, custom post types and more, as well as sharing slugs across languages
If you want different words in the URL for each language, you need Pro.
When things don’t work
- The official support channels are the documentation such as Getting started, the FAQ and developer resources, and the community support forum. Users of Pro and of the WooCommerce add-on can use priority support through the help desk
- To integrate with WooCommerce, you need the separately sold "Polylang for WooCommerce"
- For plugin errors and bugs, see also How to fix Polylang errors
- The differences from WPML and how to choose a plugin are explained in How to build a multilingual WordPress site: setting up WPML and Polylang
Frequently asked questions
Can I use it for free?
The basic translation features are available in the free version. Translating URL slugs, machine translation with DeepL and similar features belong to Pro (€99 per year, excluding tax).
Can I use it on a WooCommerce site?
Yes, but you need the separately sold add-on "Polylang for WooCommerce."
Can it translate automatically?
Pro lets you use machine translation with DeepL. You need your own DeepL API key.
Official sources consulted (checked October 16, 2026)
- Polylang (wordpress.org)
- Polylang Pro pricing page
- Polylang API source code (wordpress.org SVN)
- Japanese translation of Polylang (translate.wordpress.org)
Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)