상위 질문
타임라인
채팅
관점
C 지역화 함수
위키백과, 무료 백과사전
Remove ads
컴퓨팅에서 C 지역화 함수(C localization functions)는 기본적인 지역화 루틴을 구현한 C 프로그래밍 언어내 함수 모음이다.[1][2] 이 기능은 다국어 프로그램에서 사용되어 특정 로케일에 조정된다. 특히, 숫자나 통화를 표시하는 방법을 수정하는 데 쓰인다. 이 설정은 C 표준 라이브러리 내 입출력 함수의 동작에 영향을 준다.[3]
예시
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int main(void)
{
/* Locale is set to "C" before this. 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;
}
Remove ads
같이 보기
각주
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads