translate rich text component

Hey Matt -

Here’s my thoughts:

1) Custom Labels should technically work and outside of having lots of conditional merging to accomplish, wouldn’t be too difficult to implement.  The challenge you’ll have here is when a user wants to change the “default” text as they would have to edit the custom label, not the data in your custom defaults object.  With that said, you could leverage the metadata api to create/update a label and provide an intermediate step (e.g. via an after trigger possibly) to update the label when the default record itself is updated.

2)  Another option would be to create a DefaultLanguage object that is a master/detail to Defaults object.  Then, in your admin interface, provide the ability for the admin to specify default text and translated versions of that text.  Then, in your page, you would load the appropriate record for the language of the user.

3) Google Translate - You could use this two different ways.  When a default is changed, you could make an apex callout to translate the text and then store the value.  Or, you could do this all client side making the calls as necessary.  The challenge with client side is that when it comes to server side processing like document merging (e.g. conga, etc.) you wouldn’t get the translation.  The server side apex callout to google for translation would avoid the user having to translate the text themselves, however often times, it’s better to have a human translate than google especially when the language is legal in nature (you want to be 100% accurate in the translation).

If I’m understanding your requirements correctly, I’d probably lean towards #2 for full flexibility or #1 if you are familiar with metadata api, etc.

Hope that helps!