lout-users
[Top][All Lists]
Advanced

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

Re: Lout for non-English users


From: Basile STARYNKEVITCH
Subject: Re: Lout for non-English users
Date: 30 Mar 94 08:57:02 -0100

Jeff wrote:

#> As part of my preparation of the forthcoming release of
#> Basser Lout, I am now giving serious thought to the
#> issues of porting to languages other than English.
#> Below I give my current plan for resolving these
#> issues.  Please let me have any comments at all about
#> this plan now, while there is still time to correct it.

Perhaps you might consider supporting (at least optionally, perhaps
thru a compile time -DPOSIX_LOCALE switch) the Posix (at least i
believe so, i didn't check in official Posix standards) way(s) of
internationalization;, ie using the catopen(3) catclose(3) catgets(3)
setlocale(3) nl_types(5) gettext(3) etc Posix calls. See the
appropriate man pages on your Posixy system.

In my opinion, the main difference will be a Lout interface to the
catgets(3) call, or perhaps the gettext(3) call, but it seems that
catgets(3) is more common -and also lower level- than gettext(3).

Here is a (large part of) catgets man page (on SunOS5.3, ako SVR4) : 

!> catgets(3C)            C Library Functions            catgets(3C)
!> 
!> NAME
!> catgets - read a program message
!> 
!> SYNOPSIS
!> #include <nl_types.h>
!> 
!> char *catgets(nl_catd catd, int set_num, int  msg_num,  char
!> *s);
!> 
!> MT-LEVEL
!> MT-Safe
!> 
!> DESCRIPTION
!> catgets() attempts to read message msg_num, in set  set_num,
!> from  the  message  catalog  identified  by catd.  catd is a
!> catalog descriptor returned from an earlier  call  to  cato-
!> pen().
!> s points to a default message string which will be  returned
!> by  catgets()  if  the  identified  message  catalog  is not
!> currently available.
!> 
!> RETURN VALUES
!> If the identified message is  retrieved  successfully,  cat-
!> gets() returns a pointer to an internal buffer area contain-
!> ing the null terminated message  string.   If  the  call  is
!> unsuccessful  for any reason, catgets() returns a pointer to
!> s.
!> 
!> SEE ALSO
!> gencat(1), catopen(3C), setlocale(3C), gettext(3I)


You might interface it to Lout with the following assumptions:
Catd is constant and depends upon the current language (or locale).

Setnum is a number specific to a Lout package or perhaps a Lout kind
(ie months, text titles such as "chapter" "index" etc, and weekdays
are in 3 different sets).

Msg_num is unique (within a set) to each message.

s -the default string- is the english version of the string.

Lout interface might be something like 
@Message
   @Set setnum
   @Number msg_num
   @Default s


Perhaps you could mix somehow your proposal with such a Posix locale
thing?  Ideally, i also wish that even Lout error messages use such
catalogs (i'm in the process of converting my wife -a student in
psychology, and also a librarian- to Lout and this will help a lot,
since she doesn't read english as easily as i do; our children might
also be interested in Lout).

If you are using Emacs, i wrote a small emacs package to automagically
uniquely renumber error messages.

Anyway, i'm certainly waiting for an "international" Lout, since i do use
it for reports in french (and i did that by patching the dl package).
I could help by translating all lout messages into french.

Basile STARYNKEVITCH   ----  Commissariat a l Energie Atomique
DRN/DMT/SERMA * C.E. Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 1- 69.08.23.81;    phone: (33) 1- 69.08.40.66
email: address@hidden;  homephone: (33) 1- 46.65.45.53


N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]