It's not natively aupported, and unless you're message sent from the API is using a roll template (which I'm pretty sure you aren't), the message can't use the translation keys already included in the character sheet. What you could do is create your own json of translation keys and values indexed by language tag and have the script substitute them prior to sending the message. However, there are a few caveats; 1) I can't remember if the API has any way to access the language setting of a given player, and 2) the replacement can't be unique to each person that receives the message so you could make a French output or an English output, but not output that reads English to me and french to you.