> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PartyTranslation

> A translation.

A translation.

## Syntax

```cpp theme={null}
struct PartyTranslation {  
    PartyStateChangeResult result;  
    PartyError errorDetail;  
    PartyString languageCode;  
    PartyTranslationReceivedOptions options;  
    PartyString translation;  
}  
```

### Members

**`result`**   [PartyStateChangeResult](/services/playfab/multiplayer/networking/reference/enums/partystatechangeresult)

Indicates whether the translation operation succeeded.

On success, `translation` is a string of nonzero length containing the translated text. On failure, the string is empty.

**`errorDetail`**   PartyError

A diagnostic value providing additional troubleshooting information regarding any potential error condition.

The human-readable form of this error detail can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

**`languageCode`**   [PartyString](/services/playfab/multiplayer/networking/reference/typedefs)

The language code of the translation.

The language code is in BCP 47 format, such as en-US for English (United States). Supported language codes are enumerated in [Language support](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support).

**`options`**   [PartyTranslationReceivedOptions](/services/playfab/multiplayer/networking/reference/enums/partytranslationreceivedoptions)

Additional options describing the translation.

**`translation`**   [PartyString](/services/playfab/multiplayer/networking/reference/typedefs)

The translation string.

By default, profanity masking is enabled and replaces each character of a profane word with an asterisk. Profanity masking is applied after translating the unmasked source transcription. Depending on context, it's possible for the transcription to contain masked profanity but not the translation. Similarly, it's possible for the translation to contain masked profanity but not the original transcription. Profanity masking can be disabled via [PartyVoiceChatTranscriptionOptions::DisableProfanityMasking](/services/playfab/multiplayer/networking/reference/enums/partyvoicechattranscriptionoptions). <br /><br /> The translation string may be up to `c_maxChatTextMessageLength` characters long, not including the null terminator. Truncation occurs if the translated string length would exceed that limit, which can happen due to language differences even though the original string length is less than or equal to `c_maxChatTextMessageLength`. In such a case, `options` contains [PartyTranslationReceivedOptions::Truncated](/services/playfab/multiplayer/networking/reference/enums/partytranslationreceivedoptions). Truncation may occur at an arbitrary point in the UTF-8 byte sequence and may not result in a complete, valid character or word. Strings are always null terminated, even when truncated.

## Requirements

**Header:** Party.h

## See also

[Party members](/services/playfab/multiplayer/networking/reference/party_members)


## Related topics

- [PartyChatTextReceivedStateChange](/services/playfab/multiplayer/networking/reference/structs/partychattextreceivedstatechange.md)
- [PartyVoiceChatTranscriptionReceivedStateChange](/services/playfab/multiplayer/networking/reference/structs/partyvoicechattranscriptionreceivedstatechange.md)
- [Party C/C++ API overview](/services/playfab/multiplayer/networking/reference/party_members.md)
- [PartyTranslationReceivedOptions](/services/playfab/multiplayer/networking/reference/enums/partytranslationreceivedoptions.md)
- [PartyTextChatOptions](/services/playfab/multiplayer/networking/reference/enums/partytextchatoptions.md)
