Main Content

Set Locale and Display Language

The locale of a platform defines the display format for information like time, date, and currency. On macOS and Linux® platforms, the locale also defines the language of your user interface. On Windows® platforms, the display language defines the language of your user interface.

Each platform uses different settings to specify locale and display language. MATLAB® uses these platform-specific settings to determine the desktop display language and the display format for information like time, date, and currency values within the desktop. This table describes which settings to set for each platform. For supported operating systems, see System Requirements.

PlatformSettings
Windows

MATLAB uses multiple settings on Windows platforms.

  • Windows display language setting — MATLAB uses this setting to determine the MATLAB desktop display language. If the language that you want to select does not appear in the Windows display language list, you might first need to install its language pack. After changing your display language, log out and then log back into your system for the changes to take effect.

  • Windows user locale and system locale settings — MATLAB uses these settings to determine the display format within the MATLAB desktop. After changing these settings, restart your system for the changes to take effect.

The Windows display language, user locale, and system locale settings must all have the same value. Otherwise, you might see garbled text or incorrectly displayed characters. For instructions on how to change these settings or install a language pack, refer to your Windows operating system documentation.

MATLAB uses UTF-8 as its default character encoding and its process-specific system encoding. You can also set the machine-wide system encoding to UTF-8 using the Beta: Use Unicode UTF-8 for worldwide language support option, but this option is necessary only if using Windows Server 2019. For all other supported versions of Windows, this option is optional.

macOS

MATLAB uses the user locale setting on your macOS system to determine the display language and the display format within the MATLAB desktop. For instructions on how to change the user locale setting, refer to your macOS operating system documentation. If the locale that you want to select is not available, you might first need to install its language pack.

MATLAB automatically chooses a codeset for each combination of language and region in the locale setting. If you customize the locale setting on your system, MATLAB ignores the customized portion. MATLAB also ignores the LANG environment variable and the Terminal application locale setting.

Linux

MATLAB uses the LANG environment variable on your Linux system to determine the display language and the display format within the MATLAB desktop.

For instructions on how to change the LANG environment variable, refer to your Linux operating system documentation. If you see garbled text or incorrectly displayed characters, you might need to install fonts for your selected locale as well.

Unsupported Locale Settings

MATLAB does not support every locale setting. If the user-specified locale is unsupported, MATLAB uses the default locale en_US_POSIX.US-ASCII, also known as the C locale.

Supported Character Sets and Encodings

MATLAB uses Unicode® as its internal character set so that it can represent all letters and symbols, regardless of platform, language, or locale. MATLAB uses UTF-8 as its default character encoding so that it can represent all Unicode code points in files and byte streams. MATLAB also supports other character encodings for backwards compatibility and interoperability.

Localized Formats in Current Folder Browser

In the Current Folder browser, MATLAB usually uses platform-neutral localized formats and rules. You can, however, use the operating system short date format to control the format for displaying file date and time data.

Related Topics