I’m trying to translate a few phrases using https://wpdatatables.com/wpdatatables-localization-translation/ but unfortunately it doesn’t work. Besides, nothing changes when I select languages e.g. French or Russian, where the translation files are already part of the plugin.
I would like to translate only the following strings: “Clear Filters”, “From”, “To”
Could you give me the location of these phrases in the original code, so that I can make adjustments there?
If you're modifying the English file, there's an error with how the .po and .mo files are saved. They are saved as ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables.po and ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables.mo instead of ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables-en_US.po and ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables-en_US.mo
If you were to make the change, when you translate the string, it will change the button as well:
For example I added "REMOVE FILTERS" instead of "Clear Filters".
Hello!
I’m trying to translate a few phrases using https://wpdatatables.com/wpdatatables-localization-translation/ but unfortunately it doesn’t work. Besides, nothing changes when I select languages e.g. French or Russian, where the translation files are already part of the plugin.
I would like to translate only the following strings: “Clear Filters”, “From”, “To”
Could you give me the location of these phrases in the original code, so that I can make adjustments there?
Thanks
Julius
Hello Julius
Sure, you can find "Clear Filters" in these files:
wp-content/plugins/wpdatatables/templates/admin/table-settings/table_settings_block.inc.php on line 668
wp-content/plugins/wpdatatables/templates/frontend/filter_form.inc.php on line 30
"From" and "To" can be found in /wp-content/plugins/wpdatatables/source/class.wdttools.php on lines 399 and 447.
Please note that these changes will revert after the plugin updates, so you will need to do it again
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Worked great. Thanks :-)
You're welcome Julius
If you have any further questions or issues, please feel free to open a new ticket, and we'll gladly help.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
What might be the reason Loco Translate does not change "clear filters" even translated in the pot file for the plugin?
Hello Ondrej
If you're modifying the English file, there's an error with how the .po and .mo files are saved. They are saved as ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables.po and ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables.mo instead of ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables-en_US.po and ../wp-content/plugins/wpdatatables/languages/en_US/wpdatatables-en_US.mo
If you were to make the change, when you translate the string, it will change the button as well:
For example I added "REMOVE FILTERS" instead of "Clear Filters".
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables