Hi, Kevin Ryde writes: > By way of concrete suggestion, something like > > (locale-weekday N) > (locale-weekday-short N) > (locale-month N) > (locale-month-short N) > > or similar names would be much nicer than messing about with > > (... (+ ABDAY_1 N)) > (... (+ MON_1 N -1)) ;; if N is 1 to 12 The patch below (against HEAD) addresses some of the concerns that were raised earlier, notably: 1. The awful, C-ish `nl_langinfo'-based API is now replaced by a shiny Schemey API, following Kevin's suggestion. `nl-langinfo' itself is only used internally and not exported. As a result, most of the `nl-langinfo'-based procedures are written in Scheme. 2. Since `nl-langinfo' is hidden from Scheme programmers, all the `locale-' procedures are guaranteed to work, no matter whether `nl_langinfo ()' is actually available (see the feature-conditional macros in `i18n.scm'). As a consequence, SRFI-19 internationalization is now straightforward as does not require feature-conditional code. 3. Previously uninterpreted `nl_langinfo ()' special return values are now correctly interpreted. For instance, the return value for `GROUPING' should not be interpreted as a string, as was the case with my earlier patch. 4. No attempt is made to convert to a different encoding the strings returned by `nl_langinfo ()'. 5. High-level procedures for locale-dependent number output are provided, namely `number->locale-string' and `monetary-amount->locale-string'. Both of them are implemented in Scheme (which is relieving, really ;-)). 6. Various bugs in the C code base were fixed, a few improvements were made (notably slight optimizations for systems without `locale_t'). 7. The test suite and documentation were augmented. I'm well aware that the patch is hard to read. Perhaps the most important things to start with are the API in `i18n.scm' and the corresponding documentation and test cases. Thanks, Ludovic.