MDUIDocs
Copy llms.txt URLCopy llms-full.txt URLView as MarkdownDiscuss this page with ChatGPTDiscuss this project's docs with ChatGPT
Preset Colors
Custom Color
Extract Color from Wallpaper
Select a Wallpaper
Getting Started
Build with AI
Styles
Frameworks
Components
Functions
JavaScript Library dialog alert confirm prompt snackbar getTheme setTheme getColorFromImage setColorScheme removeColorScheme loadLocale setLocale getLocale throttle observeResize breakpoint
Libraries

getLocale

The getLocale function is used to get the current locale code. For more details, refer to 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. Refer to Supported Languages for a list of locale codes.

On this page