This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/14641] Add a strftime()-like function for formatting human names


http://sourceware.org/bugzilla/show_bug.cgi?id=14641

--- Comment #10 from keld at keldix dot com <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 <bugdal at aerifal dot cx> ---
> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]