<aside>
Description
SimpleT Translate provides automatic translation services for Salesforce Flows and Apex code. It supports multiple translation engines, batch processing, automatic language detection, and real time results for multilingual content automation.
</aside>
SimpleT Translation Options
- Flow-based translation: Set up translations using declarative tools in Salesforce Flows, with no code required.
- Apex-based translation: Use programmatic control in Apex to apply translations in custom logic and applications.
Setup
Use the following guides to get your Salesforce org ready for SimpleT Translate:
What You Can Do
Translation capabilities
- Multi-language translation: Convert text into multiple languages at the same time.
- Automatic language detection: Let the system detect the source language for you.
- Bulk processing: Translate many pieces of text in one operation.
- Engine selection: Choose between different translation engines for better quality or cost.
- Real-time results: Get translations immediately in your Flow or Apex logic.
Translation Parameters Explained
Required fields
Source Text
- What it is: The text you want to translate.
- Examples:
- "Hello, how can I help you today?"
- Case description field:
{!$Record.Description}
- User input:
{!textInput}
- Character limits: Varies by engine (typically 1000–5000 characters).
Target Languages
- What it is: The list of languages you want translations in.
- Format: ISO language codes (2-letter).
- Examples:
- Single language:
["es"] (Spanish)
- Multiple languages:
["es", "fr", "de", "it"] (Spanish, French, German, Italian)
- Dynamic list:
{!userLanguagesList} (from records or calculations)
Translation Engine
- What it is: Which translation service to use.
- Available options (configured by an admin):
"ST Google Translate Default" – general purpose, good coverage.
"ST DeepL Default" – high quality for many European languages.
"ST AI Default" – AI-powered, more context-aware.
"ST AWS Default" – Amazon Translate, cost-effective and reliable.
- Custom engines defined by your administrator.
- How to choose: Ask your admin which engines are available and recommended.
Optional fields
Source Language
- What it is: The language of the original text.
- When to use:
- Leave blank for automatic detection (recommended for most cases).
- Set explicitly when you are sure of the source language.
- Some engines may require it.
- Examples:
"en" (English), "es" (Spanish), null (auto-detect).
Apex-based translation
To use the st_translate method, create a List<ST_TranslationWrapper> with the required data.
For more information about the ST_DetectLanguageWrapper class, see the related language detection documentation.
// Create a new wrapper to hold translation job details.
simpleT.ST_TranslationWrapper wrapper = new simpleT.ST_TranslationWrapper();
// Create a list of target languages for translation.
List<String> targetLanguages = new List<String>();
// Add 'de' and 'hr' as target languages.
targetLanguages.add('de');
targetLanguages.add('hr');
// Assign target languages to the wrapper.
wrapper.targetLanguages = targetLanguages;
// Set the source language for translation.
wrapper.sourceLanguage = 'en_US';
// Choose the translation engine for this job.
wrapper.engine = 'ST Google Translate Default';
// Mark that the request originates from a Salesforce component.
wrapper.salesforceComponent = true;
// Add the text to be translated (HTML is supported).
wrapper.text = '<hello><div><br>Simple Translate helps to simplify translation</br></div></hello>';
// Create a list of wrappers (invocable methods require a list).
List<simpleT.ST_TranslationWrapper> translationWrappers =
new List<simpleT.ST_TranslationWrapper>();
translationWrappers.add(wrapper);
// Call stTranslate to start the translation job.
// The method returns translations for all selected target languages.
simpleT.ST_TranslateInvocable.stTranslate(translationWrappers);

Flow-based translation
- Navigate to Salesforce Flows to enable real-time data translation.
- Create or modify a Flow.
- For record-triggered Flows, select Optimize the Flow for Actions and Related Records.
- Set the Flow to run asynchronously.
- Use the SimpleT translation action in the Flow.
- In the Flow Action search bar, type Simple Translate RealTime Data Translation.
- Use the Simple Translate Real-Time Translation action to translate text.
- The action accepts a
List<ST_TranslationWrapper> as its parameter.

ST_TranslationWrapper class
- Encapsulates targetLanguages, sourceLanguage, engine, text, and translations.
- Required: targetLanguages, engine, and text.
- Available engines: ST AWS Default, ST Google Translate Default, ST DeepL Default (plus any custom engines you define).
- Check supported ISO language codes per engine inside the Simple Translate app.
- translations is a list of ST_TranslationResponseWrapper items with translated text and language details.

Practical examples
Example 1: Case description translation
Scenario: Automatically translate case descriptions into the agent's language when a case is created.
Flow setup
- Trigger: When Case is created.
- Variables:
- Constant:
Use the Flow to:
- Add values to
agentLanguages (for example "en_US", "de", "fr", "it", "pt").
- Call the translation action:
- Loop through
translationResults.
- Add a decision that checks if the translation language is German (
"de").