Changes

Jump to: navigation, search

BTC640/Text

173 bytes added, 14:42, 17 January 2013
Part 2
<pre>
 
#include <libintl.h>
#include <locale.h>
int main(void)
{
setlocale( LC_ALL, "" ); //bindtextdomain( "hello", "/usr/share/locale" ); bindtextdomain( "hello", "./locale" ); textdomain( "hello" );
printf( gettext( "Hello, world!\n")); printf("This is how you say 'crazy' in the current language: "); printf(gettext("crazy\n")); printf(gettext("Note that newlines at the end of the translated strings matter\n" ) );
return 0;

Navigation menu