babble
babble copied to clipboard
Custom meta field translation UIs
For particular use cases, like Alley's Fieldmanager repeated fields (see slideshow code example), the standard Babble meta field translation UI control will not work as the data is serialised into a single post meta field. In this case users can extend the abstract Babble_Meta_Field
class and create their own translation UI control for their own particular use cases.
There are some things we need to join together and fix up to allow this
- [x] Allow HTML on the output (i.e. "to be translated") side of the translation UI control
- [x] Allow the
Babble_Meta_Field::update
method to alter the value before it is saved - [ ] Sync untranslated elements of the serialised data (devs could do it themselves, or ignore it, or we might look to see if we can make this easier…)
- [ ] Tests where appropriate
Added a note about syncing untranslated elements of the serialised data; i.e. if the original post is altered, but altered element of the serialised data is not translated (e.g. the image is changed for a slide in a series of slides) and a translation is not triggered (because there's nothing to translate), that image change will not be synced by default. Does that make sense?