Home > @magiclane/maps-sdk > LocalizationService > getStrings
LocalizationService.getStrings() method
Retrieves multiple localized strings for the given list of string IDs.
If useDefaultString is true and a string ID is not found in the current language, the default string (in English) will be returned instead of an empty string. If a string ID does not exist, an empty string is returned for that ID.
The localization is based on the current SdkSettings.language setting.
Signature:
static getStrings(stringIds: number[], useDefaultString?: boolean): string[];Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
stringIds |
number[] |
A list of string IDs to retrieve |
|
useDefaultString |
boolean |
(Optional) Whether to return the default string if an ID is not found |
Returns:
string[]
A list of localized strings corresponding to the given string IDs