MDUIDocs
Copy llms.txt linkCopy llms-full.txt linkView this page in MarkdownDiscuss this page with ChatGPTDiscuss full project docs with ChatGPT
Preset Colors
Custom Color
Extract from Wallpaper
Please select a wallpaper
Getting Started
AI-Assisted Development
Styles
Integration with Frameworks
Components
Functions
jq Library dialog alert confirm prompt snackbar getTheme setTheme getColorFromImage setColorScheme removeColorScheme loadLocale setLocale getLocale throttle observeResize breakpoint
Libraries

getLocale

The getLocale function returns the current locale code. For more details, see Localization.

Usage

Import the function:

import { getLocale } from 'mdui/functions/getLocale.js';

Example:

// Get the current locale code
getLocale();

API

getLocale(): LocaleCode

This function returns a locale code. See Supported Languages for the full list of supported locales.

On this page