Translation.TranslateString
---------------------------

Translates a single string of text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Translation](component_Translation.md) | [16.0](newinversion160.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "Translation.TranslateString"; SessionID; Text ) 

**MBS**( **"Translation.TranslateString";** /\* Translates a single string of text. \*/  
**$SessionID**; /\* The translation session.e.g. $session \*/   
**$Text**) /\* The text to translate.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| SessionID | The translation session. | $session |
| Text | The text to translate. | "Hello World" |

### Result

Returns text or error.

### Description

Translates a single string of text.  
This function translates a single line of text and might display different UI depending on the state of the translation. The required languages for translation don't have to be installed before calling this method.  
  
If the required languages for translation have already downloaded and the source language is clear, this function returns results without showing any UI to the person.  
  
If the source or target language aren't installed, the framework asks the person for permission to download the languages. During the download a progress indicator displays. After it completes, the framework performs the translation.  
  
If the sourceLanguage is empty and the framework can't detect the source language from the content, the framework prompts the person to choose the source language.  
  
This function throws an error if:   
- The person doesn't agree to downloading the languages
- The person dismisses the progress view during language downloads
- TranslationSession fails system validation
- The session doesn't allow requesting downloads and languages aren't installed
- You already cancelled the session
- Something goes wrong during translation

If a person dismisses the progress view while the languages download, the system throws a user cancelled error, and the languages continue to download in the background.  
  
Note: This function call can take several minutes while languages download.  
### Examples

Translate text:

 Let(\[  
 session = MBS ( "[Translation.StartSession](TranslationStartSession.md)"; "de"; "en");  
 text = MBS ( "Translation.TranslateString"; session; "Hallo Leute");  
 r = MBS ("[Translation.Release](TranslationRelease.md)"; session)  
\]; text)  
<small>  
Example result: Hallo Leute</small>### See also

- [Translation.Release](TranslationRelease.md)
- [Translation.StartSession](TranslationStartSession.md)
- [Translation.Translations](TranslationTranslations.md)

### Example Databases

- [Mac and iOS/Translation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Translation.shtml#5ScriptAnchor_)

### Blog Entries

- [Translation Framework in FileMaker](https://www.mbsplugins.de/archive/2026-01-07/Translation_Framework_in_FileM/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2026, Seite 8](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)
- [Ausgabe 1/2026, Seite 6](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)
- [Ausgabe 1/2026, Seite 10 bis 11](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)

This function checks for a license.

Created 24th November 2025 , last changed 14th December 2025

  
[Translation.TargetLanguage](TranslationTargetLanguage.md) - [Translation.Translations](TranslationTranslations.md)

[HTML Version](TranslationTranslateString.shtml)