Skip to content

pantoken / renderers/web-components/src / LocaleSet

Atanga: LocaleSet<K>

Alpha

He wāhanga momo-momo (typed) o ngā LocaleBundle. I waihangahia e createLocaleSet hei aukati i ngā reo e tautokohia ana e te taupānga i te wā whakahiato (compile time) — ko te rēhita, te tiki rānei i tētahi reo kāore i roto i te huinga he hapa TypeScript.

Ngā Tawhā Momo

K

K whānui string

Ngā Rawa

locales

readonly locales: readonly K[]

Alpha

Ngā tapanga reo kua whakaurua ki tēnei huinga.

Ngā Tikanga

has()

has(locale): locale is K

Alpha

Kaitiaki momo — tūturu (true) ina kei roto i tēnei huinga ko locale.

Ngā Tawhā

locale

string

Whakahokia

locale is K


get()

get(locale): LocaleBundle

Alpha

Whakautua te bundle mō locale. Ka whiua he hapa i te wā whakahaere (runtime) mēnā ka karangahia me tētahi reo kāore i te mōhiotia.

Ngā Tawhā

locale

K

Whakahokia

LocaleBundle


register()

register(locale, target?, options?): void

Alpha

Rēhita ngā wāhanga @pantoken/web-components ki te reo kua tohua mai i tēnei huinga.

Ngā Tawhā

locale

K

target?

ElementRegistry

options?
prefix?

string | null

only?

readonly string[]

Whakahokia

void