Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 941 Bytes

File metadata and controls

39 lines (25 loc) · 941 Bytes
layout default
title Settings

Settings

Global configuration for the library. Affects HDSModel, HDSService, and localization.

settings.setServiceInfoURL(url)

Set the default HDS service info endpoint. Used by HDSModel initialization and HDSService.

HDSLib.settings.setServiceInfoURL('https://demo.datasafe.dev/reg/service/info');

Default: https://demo.datasafe.dev/reg/service/info

settings.getServiceInfoURL()

Returns the currently configured service info URL.

const url = HDSLib.settings.getServiceInfoURL();

settings.setPreferredLocales(locales)

Set the preferred language order for localized text. Supported locales: en, fr, es.

// French first, then English
HDSLib.settings.setPreferredLocales(['fr', 'en']);

Default order: ['en', 'fr', 'es']

See Localization for details on how localized text is handled.