delorie.com/djgpp/doc/libc/libc_705.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

setlocale

Syntax

 
#include <locale.h>

char *setlocale(int category, const char *locale);

Description

This function sets part or all of the current locale. The category is one of the following:

LC_ALL

Set all parts of the locale.

LC_COLLATE

Set the collating information.

LC_CTYPE

Set the character type information.

LC_MONETARY

Set the monetary formatting information.

LC_NUMERIC

Set the numeric formatting information.

LC_TIME

Set the time formatting information.

The locale should be the name of the current locale. Currently, only the "C" and "POSIX" locales are supported. If the locale is NULL, no action is performed. If locale is "", the locale is identified by environment variables (currently not supported).

See section localeconv.

Return Value

A static string naming the current locale for the given category, or NULL if the requested locale is not supported.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
setlocale(LC_ALL, "C");


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004