PHP Constants

It is possible to change the default way Polylang works by setting some options in wp-config.php. You can add a line such as:

define('OPTION', false);

above the comment:
/* That’s all, stop editing! Happy publishing. */
Alternatively, it is possible to create a file named ‘pll-config.php’ in the directory ‘/wp-content/polylang/’ (you have to create the directory too) and set the options in this file instead of ‘wp-config.php.’


Defaults to true.
This option allows Polylang to return the url of the homepage in the right language instead of the default homepage. Although the feature allows Polylang working with a lot of themes without any modification, it may break some themes. If you set it to false, you will need to modify your theme and replace calls to home_url(), home_url(‘/’), bloginfo(‘url’), get_bloginfo(‘url’) by pll_home_url() if you want a link to the homepage in the right language.


Defaults to true.
Prior to WordPress 3.6, adds javascript code to modify the search form when using default permalinks.

PLL_MEDIA_SUPPORT (deprecated)

Removed in v1.0 as it is now useless. Use the corresponding option in Polylang settings instead.

Defaults to ‘pll_language’.
Defines the name of the cookie used by Polylang to store the visitor’s language.
When PLL_COOKIE is set to false, Polylang does not set any cookie. Be aware that in this case, not everything will work correctly. For example, the login page will not translate.


Defaults to true.
Wether to load the WPML API.


Defaults to true.
Wether to load support of some 3rd party plugins. Currently concerns WordPress SEO by Yoast, YARPP, Custom field template, Jetpack (infinite scroll)


Defaults to true.
Wether to load the calendar widget modified by Polylang.


Defaults to true.
Some themes query a specific category for a specific usage (such as a slider). By default Polylang automatically queries the translation of this specific category when it exists. The option allows to enable / disable the feature.


Defaults to true.
By default, Polylang caches the urls of homepages in all languages. This is not compatible with websites accessible from more than one domain (as only one domain is cached). The option allows to disable the cache and thus make Polylang compatible with multiple domains.


Defaults to true.
By default, Polylang encodes the flags (only those provided with the plugin) directly in the html request instead of linking to image files. This is nice for performances as it avoids one http request per flag, but is no compatible with Internet Explorer 6 & 7. The option allows to disable the flags encoding for websites needing to be compatible with these old browsers.