[Haskell-cafe] Re: Pure Haskell Printf

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Tue Nov 16 12:43:08 EST 2004

> On 2004 November 16 Tuesday 06:42, Jérémy Bobbio wrote:
> > There is a probleme with ShowS though: it is not internationalizable at
> > all.  Strings like printf's or with any kind of variable substitution is
> > required for proper internationalization / localization.
> Printf is not adequate for internationalization either, because word (and thus 
> parameter) ordering may vary among languages.

POSIX / SUS 2001 printf() supports positional arguments, like this:

printf("%2$d %1$s\n","days of christmas",12);

This is required for l10n, as you say..

--KW 8-)
Keith Wansbrough <kw217 at cl.cam.ac.uk>
University of Cambridge Computer Laboratory.

More information about the Haskell-Cafe mailing list