WPIntell

Source evidence

How to translate dynamic strings with Polylang?

Easy Appointments · support · 2025-08-28T10:25:00+00:00

complaintsentiment
highseverity
1.0relevance
6replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

7 / 36 rows with source links

19.4% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

29 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
vipteam unresolved
Hello Support, How can I translate dynamic strings such as Custom Form Fields (Name, Email, Phone) and Labels (Service, Location, Worker) using Polylang? Does the Easy Appointments plugin use standard WordPress translation functions (__() or _e()) in these areas? Is it necessary to use pll_register_string() to register the strings with Polylang? If so, what is the correct text domain and which strings should be registered (the labels or the slugs or something else)? Thanks in advance. Regards, Hi, Easy Appointments already uses WordPress translation functions (__() / _e()), so all static strings can be translated through standard .po/.mo files (e.g., with Loco Translate). However, labels such as Name, Email, Phone, Service, Location, and Worker are dynamic (stored in the database), so Polylang won’t detect them automatically. For these, you’ll need to register them manually with Polylang using pll_register_string(). You can add the following code to your theme’s functions.php file: add_action(‘init’, function() { pll_register_string(‘ea_name_label’, ‘Name’, ‘easy-appointments’); pll_register_string(‘ea_email_label’, ‘Email’, ‘easy-appointments’); pll_register_string(‘ea_phone_label’, ‘Phone’, ‘easy-appointments’); pll_register_string(‘ea_service_label’, ‘Service’, ‘easy-appointments’); pll_register_string(‘ea_location_label’, ‘Location’, ‘easy-appointments’); pll_register_string(‘ea_worker_label’, ‘Worker’, ‘easy-appointments’); }); After updating the file, go to Polylang and select String Translations, refresh the page, and you’ll find these fields listed under the easy-appointments group, where you can add your translations. Refer to this screenshot. Hi @akshaycode1 , Thank you for the instructions. I followed them and added the provided code snippet to my functions.php file. The strings were successfully registered in Polylang under the easy-appointments group, and I have added the translations for all languages. However, the Labels and Custom Form Fields on the form are not changing. The form continues to display only what was entered in the plugin settings (Settings > Labels, and Settings > Custom Form Fields), and the same text is shown on all languages. This leads me to believe there might be a compatibility issue between the two plugins. It appears the Easy Appointments plugin is not calling the translated strings from Polylang to display the form field labels, or it is unable to see them. While researching on the Polylang support forum, I found a topic that seems to point to the root cause of the problem (related to Polylang v3.7 and newer). The relevant response, in brief: "Indeed, there has been a regression since we (Polylang) started loading our script that handles AJAX requests from a JS file, rather than embedding it directly in a PHP method (using the <script> tag). That said, the issue comes from the fact that MailPoet dequeues our script because it is not included in the list of “allowed scripts” they have defined." https://wordpress.org/support/topic/since-polylang-3-7-x-mailpoet-doesnt-find-translation/ https://github.com/mailpoet/mailpoet/pull/6226 If my assumption is correct, could you please provide a fix to make Easy Appointments compatible with Polylang? Ideally, I would love to see full compatibility with the Polylang plugin in one of your future updates. Until then, I would be satisfied if I could achieve this by adding a working code snippet to my functions.php file. Thanks in advance. Regards, Alright, we have raised a GitHub ticket regarding this request and it will be addressed in an upcoming update. Hi, We have released version 3.12.20 , which addresses this concern. Kindly update the plugin to the latest version, clear your cache, and give it a try. Thank you @akshaycode1 . However, the new version does not bring a change. Without the expected result. Changelog: 3.12.20 (2026-01-31): * Added Full compatibilty with Polylang Plugin. #189 The strings are duly registered in Polylang. The cache and history have been deleted. There is no change. The Easy Appointment plugin does not pull translated strings from Polylang. Language files po/mo have translations for: Name, Email, Phone Location, Service, Worker Price, Date & time Of these, only Price , Date & time has been translated. The translation is neatly visible on the website. By this I can only assume that the cause of the problem is in the language pot file. Or something else was left unfinished. Note for other users: If someone wants to use the snippet above, they need to replace the ‘ and ’ with ‘ characters first. If you don’t, you will get a Fatal Error. I hope this will be helpful to someone. Hi vipteam, Thank you for taking the time to try our latest version. We’re sorry to hear that the update didn’t resolve your issue. We will recheck everything from our side and get back to you as soon as we have an update.

Comments

6 shown
Akshay A 2025-08-29T11:38:00+00:00

Hi, Easy Appointments already uses WordPress translation functions (__() / _e()), so all static strings can be translated through standard .po/.mo files (e.g., with Loco Translate). However, labels such as Name, Email, Phone, Service, Location, and Worker are dynamic (stored in the database), so Polylang won’t detect them automatically. For these, you’ll need to register them manually with Polylang using pll_register_string(). You can add the following code to your theme’s functions.php file: add_action(‘init’, function() { pll_register_string(‘ea_name_label’, ‘Name’, ‘easy-appointments’); pll_register_string(‘ea_email_label’, ‘Email’, ‘easy-appointments’); pll_register_string(‘ea_phone_label’, ‘Phone’, ‘easy-appointments’); pll_register_string(‘ea_service_label’, ‘Service’, ‘easy-appointments’); pll_register_string(‘ea_location_label’, ‘Location’, ‘easy-appointments’); pll_register_string(‘ea_worker_label’, ‘Worker’, ‘easy-appointments’); }); After updating the file, go to Polylang and select String Translations, refresh the page, and you’ll find these fields listed under the easy-appointments group, where you can add your translations. Refer to this screenshot.

vipteam 2025-08-29T17:45:00+00:00

Hi @akshaycode1 , Thank you for the instructions. I followed them and added the provided code snippet to my functions.php file. The strings were successfully registered in Polylang under the easy-appointments group, and I have added the translations for all languages. However, the Labels and Custom Form Fields on the form are not changing. The form continues to display only what was entered in the plugin settings (Settings > Labels, and Settings > Custom Form Fields), and the same text is shown on all languages. This leads me to believe there might be a compatibility issue between the two plugins. It appears the Easy Appointments plugin is not calling the translated strings from Polylang to display the form field labels, or it is unable to see them. While researching on the Polylang support forum, I found a topic that seems to point to the root cause of the problem (related to Polylang v3.7 and newer). The relevant response, in brief: "Indeed, there has been a regression since we (Polylang) started loading our script that handles AJAX requests from a JS file, rather than embedding it directly in a PHP method (using the <script> tag). That said, the issue comes from the fact that MailPoet dequeues our script because it is not included in the list of “allowed scripts” they have defined." https://wordpress.org/support/topic/since-polylang-3-7-x-mailpoet-doesnt-find-translation/ https://github.com/mailpoet/mailpoet/pull/6226 If my assumption is correct, could you please provide a fix to make Easy Appointments compatible with Polylang? Ideally, I would love to see full compatibility with the Polylang plugin in one of your future updates. Until then, I would be satisfied if I could achieve this by adding a working code snippet to my functions.php file. Thanks in advance. Regards,

Akshay A 2025-09-01T10:17:00+00:00

Alright, we have raised a GitHub ticket regarding this request and it will be addressed in an upcoming update.

Akshay A 2026-01-31T12:01:00+00:00

Hi, We have released version 3.12.20 , which addresses this concern. Kindly update the plugin to the latest version, clear your cache, and give it a try.

vipteam 2026-01-31T20:11:00+00:00

Thank you @akshaycode1 . However, the new version does not bring a change. Without the expected result. Changelog: 3.12.20 (2026-01-31): * Added Full compatibilty with Polylang Plugin. #189 The strings are duly registered in Polylang. The cache and history have been deleted. There is no change. The Easy Appointment plugin does not pull translated strings from Polylang. Language files po/mo have translations for: Name, Email, Phone Location, Service, Worker Price, Date & time Of these, only Price , Date & time has been translated. The translation is neatly visible on the website. By this I can only assume that the cause of the problem is in the language pot file. Or something else was left unfinished. Note for other users: If someone wants to use the snippet above, they need to replace the ‘ and ’ with ‘ characters first. If you don’t, you will get a Fatal Error. I hope this will be helpful to someone.

Sanjeev Kumar 2026-02-03T02:21:00+00:00

Hi vipteam, Thank you for taking the time to try our latest version. We’re sorry to hear that the update didn’t resolve your issue. We will recheck everything from our side and get back to you as soon as we have an update.