Skip to content

Function: getLocalizedString() ​

ts
function getLocalizedString(
   localized, 
   preferredLocale?, 
   fallbackLocale?
): string | undefined;

Defined in: domain/contracts.ts:27

Helper to get a localized string with fallback to default locale

Parameters ​

ParameterTypeDefault value
localized| string | LocalizedString | undefinedundefined
preferredLocale?string"en"
fallbackLocale?string"en"

Returns ​

string | undefined