Email list hosting service & mailing list manager

Reordering and internationalization bear (05 Jun 2002 17:44 UTC)
Re: Reordering and internationalization bear (05 Jun 2002 17:47 UTC)
Re: Reordering and internationalization Scott G. Miller (05 Jun 2002 20:07 UTC)

Re: Reordering and internationalization Scott G. Miller 05 Jun 2002 20:07 UTC
Please see the related work on SRFI-29, which addresses this very issue
by extending Basic Format Strings with the notion you describe.

	Scott

On Wed, Jun 05, 2002 at 10:44:32AM -0700, bear wrote:
>
> When modifying code to work for users who use another language,
> it is frequently necessary to reorder the "data" parts of the
> output to match the syntax of the language of output.
>
> For example, if I am talking about some chunk of data as a
> thing being acted upon (linguistically, a direct object) by
> a procedure (linguistically, a verb) in my debugger error
> messages, then the verb should come before the direct object
> in English, but the verb should come after the direct object
> in German.  Since both of these (data and function name) are
> likely to be parameters of the format statement, being unable
> to reorder them by just changing the format string causes a
> problem.
>
> When finished, I'd like to be able to write something like:
>
> (let ((language 'en ))
>   (display
>      (format (strings "sorry, can't ~1a the object ~2a" language)
> 	errproc
> 	errdata)))
>
> Because this would allow all the localization can be done
> by providing additional format strings for different languages,
> without the need to rearrange code.  Specifically, this would
> allow the same code to operate in multiple languages as long
> as a binding for the variable 'language' were in scope and
> the strings function had lookup tables for format strings in
> the specified language.  (I'm assuming use of the same language
> specifiers as used in the HTTP protocol).
>
> 			Bear
>
> (considering writing that SRFI for the (strings) function...)
>
>

--