Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 16 Mar 2015 22:01:19 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: libintl: stubs or working functions?

On Tue, Mar 17, 2015 at 08:40:04AM +0700, Рысь wrote:
> On Mon, 16 Mar 2015 14:41:56 +0100
> Szabolcs Nagy <nsz@...t70.net> wrote:
> 
> > * ???????? <lynx@...server.ru> [2015-03-16 11:18:46 +0700]:
> > > I have this test program:
> > > 
> > > % cat
> > > dt.c #include <time.h>
> > > #include <stdio.h>
> > > 
> > > int main(void)
> > > {
> > > 	char x[32];
> > > 	struct tm *tm;
> > > 	time_t t;
> > > 
> > > 	t = time(NULL);
> > > 	tm = localtime(&t);
> > > 	strftime(x, sizeof(x), "%x", tm);
> > > 	printf("%s\n", x);
> > > 
> > > 	return 0;
> > > }
> > > 
> > 
> > i think you need to call setlocale(LC_ALL, "")
> 
> Thanks! Now it worked as needed!

Great!

> Rich: from this point I probably do understand how to translate certain
> strings in C library, can you provide more info about what should be
> translated?

LC_TIME: Day and month names, am/pm, and some locale-specific formats.
See src/locale/langinfo.c for a list.

LC_MONETARY: Not supported yet.

LC_MESSAGES: Error strings (src/errno/__strerror.h), signal strings
(src/string/strsignal.c), and the yes/no regex/strings in
src/locale/langinfo.c. Maybe some other things too. Eventually dynamic
linker related messages and maybe some other things will be added.

LC_NUMERIC: Nothing.

LC_CTYPE: Nothing.

LC_COLLATE: Not supported yet.

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.