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

SRFI 29 doesn't allow for reordering

This page is part of the web mail archives of SRFI 29 from before July 7th, 2015. The new archives for SRFI 29 contain all messages, not just those from before July 7th, 2015.

Thank you for putting together SRFI 29. It will be good to have a standard way to do localization in Scheme. I have just one suggestion:

Because it relies on FORMAT, SRFI 29 can't accomodate language ordering variations. In other words, it can't model the fact that one language may require substitutions in a different order than another. While Java code for localization is often quite verbose, it handles this problem quite nicely by using indexes in format strings, e.g.:


  Object[] arguments = {
      new Integer(7),
      new Date(System.currentTimeMillis()),
      "a disturbance in the Force"
  String result = MessageFormat.format(
      "At {1,time} on {1,date}, there was {2} on planet {0,number,integer}.",
: At 12:30 PM on Jul 3, 2053, there was a disturbance in the Force on planet 7.

I would like to recommend changing SRFI 29 to support reordering in a similar manner.