@plentymarkets/shop-api / localesGetters
Variable: localesGetters ​
constlocalesGetters:object
Defined in: getters/localesGetters.ts:24
Type Declaration ​
getCode ​
getCode: (
locale) =>string
Returns the BCP 47 language code of a locale.
Parameters ​
locale ​
Locale
The locale object.
Returns ​
string
The locale code string (e.g. "en", "de"), defaulting to "en" if not set.
getLabel ​
getLabel: (
locale) =>string
Returns the human-readable label of a locale.
Parameters ​
locale ​
Locale
The locale object.
Returns ​
string
The locale label string (e.g. "English", "Deutsch"), defaulting to "en" if not set.