element-plus/docs/en-US/component/config-provider.md
jeremywu db976bba68
chore(docs): adding lang field for markdowns (#4005)
- Add lang field for all *.md files' frontmatters
2021-10-22 19:32:39 +08:00

1.8 KiB

title lang
Config Provider en-US

Config Provider

Config Provider is used for providing global configurations, which enables your entire application to access these configurations everywhere

Configure i18n related properties via Config Provider, to get language switching feature

:::demo Use two attributes to provide i18n related config

config-provider/usage

:::

Config Provider Attributes

Attribute Description Type Accepted Values Default
locale Locale Object Object<Language> languages English
i18n External translator, when this attribute is provided, it will be used at first, and it will fallback to default translator when this method returns nullish value Function<(...args: []) => string> - -

ConfigProvider Slots

Name Description
customize default content