getAttributeFromLocale
Stentor API Reference / stentor-locales/src / getAttributeFromLocale
Function: getAttributeFromLocale()
getAttributeFromLocale\<
T,K>(attribute,defaultObj,locale?,locales?):Partial\<T>[K]
Defined in: packages/stentor-locales/src/getAttributeFromLocale.ts:10
Returns the value of the given attribute from the locales object based on the provided locale.
If it is not found in the locale object, then it will take it from the default object passed in.
Type Parametersβ
Tβ
T extends object
Kβ
K extends string | number | symbol
Parametersβ
attributeβ
K
defaultObjβ
T
locale?β
locales?β
Partial\<Record\<Locale, Partial\<T>>> = {}
Returnsβ
Partial\<T>[K]