Tagged: polylang
I am currently developing a new site, using your Enfold theme and Polylang as translation plugin. When I activated the WordPress debugging mode I got the following error message:
Notice: Use of undefined constant ICL_LANGUAGE_NAME_EN – assumed ‘ICL_LANGUAGE_NAME_EN’ in /home/.sites/40/site933/web/wp/wp-content/themes/enfold/framework/php/class-framework-widgets.php on line 73
The problem is that the code checks for a WPML function which also exists in Polylang. But the constant is not defined by Polylang.
function fb_js()
{
if ( function_exists('icl_object_id') ) {
$locale = ICL_LANGUAGE_NAME_EN;
Hey GSM,
Please send us a temporary admin login so that we can have a closer look. You can post the details in the Private Content section of your reply.
Cheers!
Rikard
I fixed the php warning and enabled the correct language for the Facebook Widget by adding the following line to function.php:
define ('ICL_LANGUAGE_NAME_EN', 'German');
Hi,
Ok great, thanks for sharing that. Not sure if you need any further help though?
Best regards,
Rikard
Hi Rikard,
indeed no help needed on my side. It was more to let you know that you have a potential bug in your Facebook widget code for someone using Polylang.
Best regards,
G