[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hello-2.1.93 internationalization doesn't work
From: |
Bruno Haible |
Subject: |
Re: hello-2.1.93 internationalization doesn't work |
Date: |
Tue, 17 Oct 2006 14:57:07 +0200 |
User-agent: |
KMail/1.9.1 |
$ locale
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE=POSIX
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
$ hello
Hello, world!
Expected output is:
$ hello
Hallo, Welt!
The reason is that HAVE_SETLOCALE is tested, but nowhere defined. Since one
can assume setlocale() already for ca. 5 years, there is no risk in removing
the HAVE_SETLOCALE. Here is a proposed patch.
2006-10-16 Bruno Haible <address@hidden>
* hello.c (main): Remove HAVE_SETLOCALE conditional.
*** src/hello.c.bak 2006-08-30 00:44:19.000000000 +0200
--- src/hello.c 2006-10-17 00:44:08.000000000 +0200
***************
*** 42,51 ****
program_name = argv[0];
- #if HAVE_SETLOCALE
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
- #endif
#if ENABLE_NLS
/* Set the text message domain. */
--- 42,49 ----