Skip to content
Types
import type { JSONLoaderOptions, LocationFunction } from "@arcgis/core/intl/t9n.js";

Type definitions

JSONLoaderOptions

Type definition
Since
ArcGIS Maps SDK for JavaScript 5.0

base

Property
Type
string | undefined
Since
ArcGIS Maps SDK for JavaScript 5.0

Used to calculate the relative path of the file to load.

pattern

Property
Type
string | RegExp
Since
ArcGIS Maps SDK for JavaScript 5.0

Used to check if the loader should be used to load a candidate's message bundle.

location

Property
Type
string | URL | LocationFunction
Since
ArcGIS Maps SDK for JavaScript 5.0

The location of the translation files. It can be either a string or URL pointing to the folder where the files are located, or a function called with a specified path. The function should return the final path.

LocationFunction

Type definition
Since
ArcGIS Maps SDK for JavaScript 4.18

The function responsible for fetching a message bundle resource for a particular locale.

See also
Parameters
ParameterTypeDescriptionRequired
path

The path.

Returns
string

The location path