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.’
PLL_FILTER_HOME_URL
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.
PLL_SEARCH_FORM_JS
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.
PLL_COOKIE
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.
PLL_WPML_COMPAT
Defaults to true.
Wether to load the WPML API.
PLL_PLUGINS_COMPAT
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)
PLL_WIDGET_CALENDAR
Defaults to true.
Wether to load the calendar widget modified by Polylang.
PLL_AUTO_TRANSLATE
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.
PLL_CACHE_HOME_URL
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.
PLL_ENCODED_FLAGS
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.