-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[update] localization updated, locale, setlocale added
- Loading branch information
Showing
5 changed files
with
89 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
sidebar_label: locale | ||
title: locale | ||
description: You can learn about the locale in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking. | ||
--- | ||
|
||
# locale | ||
|
||
### Description | ||
|
||
@short: Optional. An object of a custom locale of Booking | ||
|
||
### Usage | ||
|
||
~~~jsx | ||
locale?: object; | ||
~~~ | ||
|
||
### Default config | ||
|
||
By default, Booking uses the [English](/guides/localization/#default-locale) locale. You can set it to the custom locale as well. | ||
|
||
:::tip | ||
To change the current locale dynamically, you can use the [`setLocale()`](/api/methods/booking-setlocale-method) method | ||
::: | ||
|
||
### Example | ||
|
||
~~~jsx | ||
const { data } = getData(); | ||
const widget = new booking.Booking("#root", { | ||
data, | ||
locale: de, | ||
}); | ||
~~~ | ||
|
||
**Related articles**: | ||
- [setLocale()](/api/methods/booking-setlocale-booking) | ||
- [Localization](/guides/localization) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
sidebar_label: setLocale() | ||
title: setLocale() Method | ||
description: You can learn about the setLocale() method in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking. | ||
--- | ||
|
||
# setLocale() | ||
|
||
### Description | ||
|
||
@short: Applies a new locale to Booking | ||
|
||
### Usage | ||
|
||
~~~jsx | ||
setLocale(null | locale?: object): void; | ||
~~~ | ||
|
||
### Parameters | ||
|
||
- `null` - (optional) resets to the default locale (English) | ||
- `locale` - (optional) the object of data of the new locale to be applied | ||
|
||
### Example | ||
|
||
~~~jsx {} | ||
// create Booking | ||
const booking = new booking.Booking("#root", { | ||
data, | ||
// initial configuration parameters | ||
}); | ||
|
||
// apply the "de" locale to Booking | ||
booking.setLocale(de); | ||
|
||
// apply the default locale to Booking | ||
booking.setLocale(); // or setLocale(null); | ||
~~~ | ||
|
||
**Related articles**: | ||
- [locale](/api/config/booking-locale) | ||
- [Localization](/guides/localization) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters