Re: XForms: Multiple Languages

Steve Lamont (spl@szechuan.ucsd.edu)
Fri, 14 Nov 97 10:28:33 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I agree with this. Maybe, alowing fdesign to specify the name of a header
> to be included in the header and alowing to specify a constant instead of
> text (so it does not use ""). ...

The fdesign -I option performs this function.

For example, if you do

fdesign -I whatever.h your_app.fd

fdesign will emit the your_app.c file with the line

#include "whatever.h"

rather than

#include "forms.h"

Your .h file should include the line

#include <forms.h>

(I prefer this to

#include "forms.h"

which TC seems to like for some reason).

You could use conditional compilation by setting up special include
files for each language you support and then compiling with

gcc -DGERMAN ...

gcc -DFRENCH ...

gcc -DLINEAR_B ...

and so forth. Use `#ifdef' or `#if defined()' to select the proper
include file:

#if defined( GERMAN )
#include "german_labels.h"
#endif
#if defined( FRENCH )
#include "french_labels.h"
#endif
#if defined( LINEAR_A )
#include "linear_a_labels.h"
#endif

> Nobody answered to the special character insertion in forms. Is it so
> complicated or is another of my RTFM questions? ...

I don't think it's possible other than perhaps by using the C '\x' or
'\0oo' hex or octal escapes.

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/