Locale.h

Locale.h

In computing, locale.h is an C programming language header file, used for purposes of localization. The header provides two key function: localeconv and setlocale. The former provides access to the current locale, while the latter allows one to set the current locale. The header also defines the struct lconv, which stores information about a given locale, including the local preference for the display of numbers and currency.

Usage

Inclusion

; C#include <locale.h>; C++#include <clocale>

Functions

struct lconv* localeconv(void);
char* setlocale(int, const char*);

Example


#include
#include
#include

int main(int argc, char* argv [] ){ lconv* currentlocale = localeconv(); std::cout<<"In the current locale, the default currency symbol is: " << currentlocale->currency_symbol << std::endl; return 0;}

References

# [http://www.opengroup.org/onlinepubs/009695399/basedefs/locale.h.html locale.h] by OpenGroup
# [http://www.opengroup.org/onlinepubs/009695399/functions/localeconv.html localeconv] by OpenGroup
# [http://www.opengroup.org/onlinepubs/009695399/functions/setlocale.html setlocale] by OpenGroup


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • locale — locale  UNIX‐утилита, выводящая информацию о локали. Содержание 1 Использование 2 Синтаксис 3 Параметры …   Википедия

  • Locale — locale  UNIX‐утилита, выводящая информацию о локали. Содержание 1 Использование 2 Синтаксис 3 Параметры …   Википедия

  • Locale.h — Стандартная библиотека языка программирования С assert.h complex.h ctype.h errno.h fenv.h float.h inttypes.h iso646.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stdbool.h stddef.h stdint.h stdio.h …   Википедия

  • locale — ● locale nom féminin Familier. Dans un journal, rubrique particulière à une localité, une ville, une région. ● local, locale, locaux adjectif (bas latin localis, de locus, lieu) Particulier à un lieu, à une région, à un pays : Coutumes locales.… …   Encyclopédie Universelle

  • locale (1) — {{hw}}{{locale (1)}{{/hw}}agg. 1 Che è proprio di un determinato luogo: autorità locali; ferrovia –l. 2 (med.) Che concerne o interessa solo una data parte del corpo umano: malattia –l; cura –l. 3 Treno viaggiatori a breve percorso, che si ferma… …   Enciclopedia di italiano

  • Locale — Lo cale , n. [F. local.] 1. A place, spot, or location. [1913 Webster] 2. A principle, practice, form of speech, or other thing of local use, or limited to a locality. [1913 Webster] …   The Collaborative International Dictionary of English

  • locale — index district, locality, location, part (place), region, scene, seat, section ( …   Law dictionary

  • locale — (n.) 1772, local, from Fr. local, noun use of local (adj.), from L. locus place (see LOCUS (Cf. locus)). English spelling with e (1816) probably is based on morale or else to indicate stress. The word s right to exist depends upon the question… …   Etymology dictionary

  • locale — meaning ‘a scene or locality, especially with reference to an event or occurrence taking place there’, was adopted in the 18c from French in the form local and respelt in the 19c by writers such as Walter Scott to indicate that the stress lay on… …   Modern English usage

  • locale — / locality [n] physical setting area, bailiwick, belt, district, domain, haunt, hole, home, location, locus, neck of the woods*, neighborhood, place, position, region, scene, sector, site, sphere, spot, stage, stomping ground*, territory, theater …   New thesaurus

  • locale — ► NOUN ▪ a place associated with particular events. ORIGIN French local locality , respelled to indicate stress on the final syllable …   English terms dictionary

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”