getAttribute
Stentor API Reference / stentor-locales/src / getAttribute
Function: getAttribute()
getAttribute\<
L,Return>(attribute?,locale?,localeObj?):Return
Defined in: packages/stentor-locales/src/getAttribute.ts:20
This will return the property at the given attribute based on the locale provided.
For example, if locale is undefined, then the default attribute will be returned.
If locale is a Language, then the overriding locales will be searched. If found at that language, it will be returned. If not found at that language, then the default will be returned.
If locale is a dialect, then the overriding dialect will be searched. If found at that dialect, it will be returned. If not found at that dialect, then the overriding language of the dialect will be searched. If found at that language, it will be returned. If not found at that language, then the default will be returned.
Type Parametersβ
Lβ
L extends Localizable\<any>
Returnβ
Return
Parametersβ
attribute?β
keyof L
locale?β
localeObj?β
L
Returnsβ
Return