@jay-js/system
Version:
A powerful and flexible TypeScript library for UI, state management, lazy loading, routing and managing draggable elements in modern web applications.
29 lines • 800 B
JavaScript
import { state } from "../../state/index.js";
/**
* Default internationalization options
* @type {Ti18nOptions}
*/
export const i18nOptions = {
languages: [],
defaultLocale: "en",
saveToLocalStorage: true,
localStorageKey: "jayjs-i18n-default-locale",
nestedKeys: false,
};
/**
* State management for internationalization
* Tracks the current locale and loaded language data
* @type {state<Ti18nState>}
*/
export const i18nState = state({
currentLocale: i18nOptions.defaultLocale,
language: {},
});
/**
* Defines or updates internationalization options
* @param {Partial<Ti18nOptions>} options - The i18n options to set or update
*/
export function i18nDefineOptions(options) {
Object.assign(i18nOptions, options);
}
//# sourceMappingURL=configuration.js.map