MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
94 stars 51 forks source link

Multi-language support #318

Open jonathanstegall opened 4 years ago

jonathanstegall commented 4 years ago

Is your feature request related to a problem? Please describe. See this support thread. While this thread is specific to the Bogo plugin, and specific to a Salesforce object with fields for each language, I don't think that's an unreasonable way to think about multiple languages in this plugin. At least it might be possible to support Bogo in this way.

Describe the solution you'd like The support request describes it this way:

But in WordPress we have one post for each language. So this makes the mapping impossible. I thought maybe there could be a language selection field under “WordPress Object” when creating a fieldmap. Then we could create one fieldmap for each language all mapping to the same WordPress Object but with different languages selected and different custom field mappings.

Using Bogo for multilanguage would additionally require us to create an entry _locale in the wp_postmeta table for each post that is being created by the salesforce pull. This is of course just an example as there are other Plugins for multilanguage.

I think that's a good way to think about it.

Describe alternatives you've considered I describe in the thread how it might could be achieved with developer hooks.

jonathanstegall commented 4 years ago

One thing I learned today is that WordPress Core is moving toward multilanguage support in Gutenberg in Phase 4. Presumably this won't happen for some time, since it doesn't appear that phase 2 is finished yet. https://wordpress.org/about/roadmap/

In any case, if we move to add multilanguage support to this plugin specifically, we should do it in whatever way Core does it first, with a bonus if it is possible to use hooks or whatever to support other plugins.