Set Locale on macOS Platforms

On the Apple macOS platform, MATLAB® reads the user locale setting. MATLAB automatically chooses a codeset for each combination of language and territory.

If you customize the locale setting, MATLAB ignores the customized portion. MATLAB ignores the LANG environment variable and the Terminal application locale setting.

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

To view or set the region on Mac OS X 10.10:

  1. Select System Preferences >Language & Region.

  2. Select a region and country from Region.

To set the Primary language:

  1. In the Language & Region dialog box, either drag an existing item to the top of the Preferred languages list, or select the + button to add a language and then drag the language to the top.

  2. MATLAB detects the latest setting; you do not need to restart your system.

Changing the preferred language might change the locale to a value that MATLAB does not support. When this happens, you might see garbled text or incorrect characters. To fix this problem, change the Format language value:

  1. In the Language & Region dialog box, change the Preferred languages value to the original value.

  2. Click the Advanced... button, and make note of the Format language value.

  3. Click OK.

  4. Change the Preferred languages value back to your preferred language.

  5. Click the Advanced... button again. If the Format language value changed, reselect the original language value.

External Websites