Home > @magiclane/maps-sdk > TtsLocalizationService > getString
TtsLocalizationService.getString() method
Retrieves a localized TTS string for the given string ID.
If useDefaultString is true and the string ID is not found for the currently selected TTS voice/language, the default string (English) will be returned instead of an empty string. If the string ID does not exist, an empty string is returned.
Signature:
static getString(stringId: number, useDefaultString?: boolean): string;Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
stringId |
number |
The ID of the string to retrieve |
|
useDefaultString |
boolean |
(Optional) Whether to return the default string if the ID is not found |
Returns:
string
The localized string corresponding to the given string ID, suitable for TTS