synchronizing and translating custom fields with Polylang
-
Hi,
I’m using Polylang plugin, and I have a couple of questions regarding multilanguage custom fields:1. I’d like to synchronize custom fields for all languages, so that once added in one language, the custom field is copied to the other languages. Here’s what I’ve tried so far:
– Checking “Custom fields” in Polylang’s Synchronization settings. This doesn’t work. The custom fields are not synchronized, and if I want to add the information manually in another language, the information in the original language is removed.
– Using Polylang’s pll_copy_post_metas filter (reference here)
Tried it in functions.php and in a custom plugin.
– Using the WPML language configuration file, compatible with Polylang (reference here)
Tried placing the xml file in plugins and in theme folder. Didn’t work either.
I understand that CFS is supposed to be compatible with Polylang. Is it possible to sync custom fields for all languages?2. I’d like to know if it is possible to automatically register strings for the options in a select field, so that they can be translated in Polylang’s string translation screen. I found a workaround, manually registering each option using Polylang’s pll_register_string function (reference here), but it is very likely that new options will be added in the future, and it would be a lot better if everything could be handled from the site’s backend, without having to touch the code.
Thank you very much!
- The topic ‘synchronizing and translating custom fields with Polylang’ is closed to new replies.