Skip to content

pantoken-root / renderers/web-components/src / defineBundle

Fonksiyon: defineBundle() ​

defineBundle(config): LocaleBundle

Alfa

Bir LocaleBundle oluşturur ve doğrular. Gerekli alanlar eksik olduğunda veya locale bir boş olmayan dize değilse hata fırlatır.

Parametreler ​

config ​

LocaleBundle

Döndürür ​

LocaleBundle

Örnek ​

ts
export const myLocale = defineBundle({
  locale: "x-acme",
  dir: "ltr",
  label: "Acme Corp Internal",
  strings: makeStrings("en", { back: "Return" }),
});