From 21f65d85cd41e16a0b72bcb903174e624c0ae921 Mon Sep 17 00:00:00 2001 From: Serhii Pylypchuk Date: Fri, 8 Sep 2023 09:54:42 +0300 Subject: [PATCH] [update] the setLocale() method --- docs/api/methods/setlocale_method.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api/methods/setlocale_method.md b/docs/api/methods/setlocale_method.md index aa6d6d0..36a2ebc 100644 --- a/docs/api/methods/setlocale_method.md +++ b/docs/api/methods/setlocale_method.md @@ -19,12 +19,16 @@ setLocale( ~~~ ### Parameters - + - `locale` - (required) an object of the locale +:::important +The `setLocale()` method destroys the current component and initialize a new one. If you use the component with **Toolbar**, you need to call the [`setLocale()`](api/toolbar_api/methods/setlocale_method.md) method of **Toolbar**, to change its locale. See the example below! +::: + ### Example -~~~js {97-98} +~~~js {97-98,100-102} const { ToDo, Toolbar } = todo; const { tasks, users, projects, tags } = getData(); @@ -128,8 +132,4 @@ list.setLocale(de); toolbar.setLocale(de, list.api); ~~~ -:::info -The Toolbar of To Do List is a separate component. To change its locale, you must apply its own [`setLocale()`](api/toolbar_api/methods/setlocale_method.md) method -::: - **Related article:** [Localization](guides/localization.md) \ No newline at end of file