From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24651 invoked by alias); 7 Nov 2013 12:30:53 -0000 Mailing-List: contact libc-locales-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-locales-owner@sourceware.org Received: (qmail 23424 invoked by uid 55); 7 Nov 2013 12:29:57 -0000 From: "keld at keldix dot com" To: libc-locales@sourceware.org Subject: [Bug localedata/14641] Add a strftime()-like function for formatting human names Date: Thu, 07 Nov 2013 12:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: localedata X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: keld at keldix dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q4/txt/msg00064.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14641 --- Comment #10 from keld at keldix dot com --- On Thu, Nov 07, 2013 at 02:26:39AM +0000, bugdal at aerifal dot cx wrote: > http://sourceware.org/bugzilla/show_bug.cgi?id=14641 > > --- Comment #9 from Rich Felker --- > On Wed, Nov 06, 2013 at 11:57:48PM +0000, keld at keldix dot com wrote: > > The intended use is then to switch to the locale of the address in question, > > for eg formatting of an address for a postal letter. > > This is not the way locales are supposed to be used. You don't just > keep switching them around at runtime. In your specific example of > formatting a letter, it's wrong, because you want the address > formatted according to the cultural conventions of the place in which > it's being sent, but the name written the way the recipient's name is > supposed to be written. If there are different users then it is only natural to switch to each user's locale, eg when printing a name, or printing an address. When printing a namei in an address, one should follw the IPU standard for this. This standard has several options. Either French or the local language of the receiving country. And then there may be more than one convention in a country, eg with multiple official langages. A recipient may want a name to be wrttten in ways. Eg in the Chinese, Indian, Arabic or the Latin script. Also dependent on script the family name could be placed first or last. Even with the Latin script, sometimes the family name is written first. Or the family name is written in all capitals. > > To find the correct locale for a given address is not straightforward. > > You would often have a country associated with the address and then you could > > find a locale related to that country. > > But that has nothing to do with how the name should be formatted, only > with how the address should be formatted. Also, depending on your > locale, the matter of formatting an address can depend on the > conventions of the recipient's country or the sender's. In any case > this logic is all way outside the scope of libc locale. Yes it is mostly how the address should be formatted. But it could also be used for the name formatting, eg in a letter, where you have written the text in the language of the receiver, and you also want to format the name in that language. I believe this is in scope of libc, meaning that this is to make an application culturally adaptable. It is just a more advanced use than the normal i18n, because we want to accomodate different users' cultural conventions. Still, it can be used just for one set of user preferences, eg in my country, Denmark, if I would send out a letter to many people, they would almost all be Danish, and then a few Sewdes and Norwegians and possibly German adressees, who share the same cultural conventions wrt naming and addresses. best regards keld -- You are receiving this mail because: You are on the CC list for the bug.