C localization functions
In computing, C localization functions are a group of functions in the C programming language implementing basic localization routines.[src] The functions are used in multilingual programs to adapt to the specific locale.[src] In particular, the way of displaying of numbers and currency can be modified.[src] These settings affect the behaviour of input/output functions in the C Standard Library.[src]
In computing, C localization functions are a group of functions in the C programming language implementing basic localization routines.[src] The functions are used in multilingual programs to adapt to the specific locale.[src] In particular, the way of displaying of numbers and currency can be modified.[src] These settings affect the behaviour of input/output functions in the C Standard Library.[src] ==Overview of functions== C localization functions and types are defined in ( header in C++).[src] ==Criticism== The localization state is stored globally.[src] This means that in a given program all operations involving a locale can use only one locale at a time.[src] As a result, it is very difficult to implement programs that use more than one locale.[src] The functions alter the behavior of , , and other functions which are often used to write saved data to a file or to other programs.[src] The result is that a saved file in one locale will not be readable in another locale, or not be readable at all due to assumptions such as "numbers don't have commas in them".[src] Most large-scale software forces the locale to "C" (or another fixed value) to work around these problems.[src] ==Example== include include include int main(void) { /* Locale is set to "C" before this.[src] This call sets it to the "current locale" by reading environment variables: */ setlocale(LC_ALL, ""); const struct lconv* const currentlocale = localeconv(); printf("In the current locale, the default currency symbol is: %s\n", currentlocale->currency_symbol); return EXIT_SUCCESS; } ==See also== Locale (computer software) ==References==[src]
17 sentences · 17 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"C localization functions." encyclopegia.org, 2026, https://encyclopegia.org/wiki/c-localization-functions. Accessed 01 December 2026.
Chicago
"C localization functions." encyclopegia.org. Accessed December 1, 2026. https://encyclopegia.org/wiki/c-localization-functions.
APA
encyclopegia.org. (2026). C localization functions. Retrieved December 1, 2026, from https://encyclopegia.org/wiki/c-localization-functions
Accessed December 1, 2026 · CC BY-SA 4.0 · citation page · JSON