Hi
Your requirement seems to be a Poll SMS could be sent out in multiple languages email templates and an email template could be used by multiple Polls. So we have an N:N relationship between the Poll and Email Template.
We can use the out of the box N:N but then you won't be able to add any fields to the intermediate entity if you want to store extra info about the relationship so I would recommend you create the following
01. First, you create all 4 email templates in different languages - Give them a consistent name
02. Create a new entity called SMS Templates - This will have the name of the email template in the new_name field and this will also have a lookup to email template
03. Create an intermediate entity for Poll to SMS Template N: N relationship, let's call it Poll SMS Templates - this will have a lookup to poll and lookup to SMS template entity
Every time when they create a poll, they just have to associate the SMS template, some polls might just go in English, some might go in all 4 or does not matter how many languages it will work
After the above configuration, you now have a Poll record having links to SMS templates.
Your plugin will most likely be triggering on Update of Poll i think (Send SMS Flag or something similar). In this plugin, you can query the intermediate entity to get all the SMS Template record IDs associated with that particular poll.
Perform another query on SMS Templates entity include email lookup field in your column set and this will return all the email templates that you should be sending sms for that particular Poll
You can then use the template Ids from the results and query the template entity to get all the template records
You can then loop through the email template records, generate the content and then insert to contact field or use SMS services to send it.
If you do not want to associate each poll with SMS templates and if every Poll will be sent in every language, you don't need the intermediate entity or N:N relationship.
Just create the SMS Template entity and have the email template and create one record for each language template and set the lookup value and in your plugin just query all the active SMS language templates and loop through and send SMS.
Hope this helps