Re: Best way to format a name string in Folks



On Sun, 2012-08-05 at 00:55 -0400, Chris Leonard wrote:
> My own point of view on this is that I find it frustrating when
> developers to ask a localizer to do a job that the glibc locale should
> be capable of addressing all on it's own.  Translating Day and Month
> names should be banned in PO files :-)
> 
> There is in fact an entire section in glibc locales called LC_NAME in
> the glibc locale that has a field for Name format (name_fmt) as
> described below.  My argument is that develoeprs should leverage the
> information content of the glibc locale to the greatest extent
> possible, that is after all the primary purpose of having glibc locale
> files.

That looks great, but how do I use it from C (or Vala)? The best I can
find so far is retrieving the translated name_fmt using
        nl_langinfo (_NL_NAME_NAME_FMT)
and then implementing the substitution of the field descriptors myself,
which does not sound like fun at all. Something like strftime() (but for
names) would be great. I just can't find it.

Thanks,
Philip

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]