> ## 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.

# PartyLocalChatControl::GetLanguage

> Gets the language associated with this chat control.

Gets the language associated with this chat control.

## Syntax

```cpp theme={null}
PartyError GetLanguage(  
    PartyString* languageCode  
)  
```

### Parameters

**`languageCode`**   [PartyString\*](/services/playfab/multiplayer/networking/reference/typedefs)\
*library-allocated output*

The output BCP 47 language code used by the chat control future communication. The memory for the string remains valid until the chat control is destroyed.

### Return value

PartyError

`c_partyErrorSuccess` if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via [PartyManager::GetErrorMessage()](/services/playfab/multiplayer/networking/reference/classes/PartyManager/methods/partymanager_geterrormessage).

## Remarks

The language is used as the spoken language associated with this chat control for transcription and the target language for incoming translations. If the language code specified is en-US, for instance, the input audio to this chat control will be treated as the English (United States) language and transcribed as such. If translation is enabled via either [SetTranscriptionOptions()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions) or [SetTextChatOptions()](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settextchatoptions), the incoming voice chat transcriptions and/or text chat will be translated to English (United States). <br /><br /> The language code should be in BCP 47 format; supported language codes are enumerated in [Language support](https://learn.microsoft.com/en-us/azure/ai-services/speech-service/language-support). Specifying an unsupported or invalid language code will not cause this method to fail, but will result in failure to generate transcriptions associated with this chat control. The language code can be queried via GetLanguage().

## Requirements

**Header:** Party.h

## See also

[PartyLocalChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/partylocalchatcontrol)\
[PartyLocalDevice::CreateChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol)\
[PartyLocalChatControl::SetTranscriptionOptions](/services/playfab/multiplayer/networking/reference/classes/PartyLocalChatControl/methods/partylocalchatcontrol_settranscriptionoptions)


## Related topics

- [PartyLocalDevice::CreateChatControl](/services/playfab/multiplayer/networking/reference/classes/PartyLocalDevice/methods/partylocaldevice_createchatcontrol.md)
- [PartyTextChatOptions](/services/playfab/multiplayer/networking/reference/enums/partytextchatoptions.md)
- [Understanding How PlayFab Party chat works](/services/playfab/community/voice-communications/concepts-chat.md)
- [PartyChatTextReceivedStateChange](/services/playfab/multiplayer/networking/reference/structs/partychattextreceivedstatechange.md)
- [PartyVoiceChatTranscriptionReceivedStateChange](/services/playfab/multiplayer/networking/reference/structs/partyvoicechattranscriptionreceivedstatechange.md)
