Function preloadLocalizationData
ReadonlyFunction
Type Signature
Type Declaration
Parameters
localestringThe locale to load the localization data for.
options{ baseUrl?: string } = {}The options for the preloadLocalizationData function.
- OptionalbaseUrl?: string
The location of the
nutrient-viewer-libdirectory. See Configuration#baseUrl.
Returns
Promise<void>Returns a promise that resolves when the locale data have been loaded.
Nutrient Web SDK comes with a number of predefined locales which are loaded automatically on demand when using the NutrientViewer.Instance#setLocale API or when setting a locale in the main Configuration.
The locale information are then exposed to NutrientViewer.I18n.messages.
You can use this method to preload these information instead of loading them on demand. This would allow you to modify some translations before loading Nutrient Web SDK for example.