Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

NLSSetLocale

NLS Function: Sets the current language, country, or codepage. This routine is only available for Windows.

Module

USE IFNLS

result = NLSSetLocale (language[,country] [,codepage])

language

(Input) Character*(*). Is one of the languages installed on the current system. It can be the English name of the language (for example, "German") or the native name of the language (for example, "Deutsch"), or the abbreviated language-country code (for example, "de-DE" or "en-US"). If the language-country code is specified, the country argument should be omitted.

country

(Input; optional) Character*(*). If specified, is the name of a country. It can be the English name (for example, "Germany") or the native name (for example, "Deutschland"). If it is the native name, it must have any special characters in that name. The native country name may be used with the English language name and vice-versa. If omitted, the first installed locale with the specified language name will be selected.

codepage

(Input; optional) INTEGER(4). This argument is ignored.

Results

The result type is INTEGER(4). The result is zero if successful.

Otherwise, one of the following error codes (defined in IFNLS.F90) may be returned:

  • NLS$ErrorInvalidLanguage - language is invalid or not supported

  • NLS$ErrorInvalidCountry - country is invalid or is not valid with the language specified

NOTE:

NLSSetLocale works on installed locales only. Many locales are supported, but they must be installed through the system Control Panel/International menu.

Calling NLSSetLocale has no effect on the locale used by C programs. The locale set with C's setlocale( ) routine is independent of NLSSetLocale.

See Also