...
Code Block | ||
---|---|---|
| ||
$ ./hello 똠방 50 내 이름은 똠방입니다. 내 나이는 50입니다. |
C 언어 예시
국제화를 지원하는 SW 를 개발할 경우 번역이 필요한 메시지 부분을 다음과 같이 getext() 로 감싸줍니다.
Code Block | ||
---|---|---|
| ||
printf(gettext("My name is %s.\n"), my_name); |
또는 아래와 같이 Under bar 매크로로 간단하게 작성할 수 있습니다.
...
language | cpp |
---|
...
C 로 만든 gettext 사용 예제를 https://github.com/lesstif/gettext-example 에 올려놨으니 참고하세요.
같이 보기
...