From 5d7d40fd35588f2d37012ec30fc34fa955bfbb31 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 27 Apr 2000 00:17:54 +0000 Subject: Dropped use of -fomit-frame-pointer, as I've just discovered that it prevents the use of libsafe. Also, the code size savings are negligable (96 bytes for FLUID) Added I18N docos to FLUID chapter. We probably need to expand discussion a lot more in the 2.0 docos. The EPM list installed the static FLTK library with execute permission, which caused EPM to strip the library, making it impossible to link against... :( git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- documentation/fluid.html | 59 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'documentation/fluid.html') diff --git a/documentation/fluid.html b/documentation/fluid.html index d336309d3..ebd60af3f 100644 --- a/documentation/fluid.html +++ b/documentation/fluid.html @@ -473,6 +473,12 @@ FLUID with the -c switch.

The output file names are the same as the .fl file, with the leading directory and trailing ".fl" stripped, and ".h" or ".cxx" appended.

+

File/Write Messages (Alt+Shift+W)

+Writes a message file for all of the text labels defined in the current file. +

The output file name is the same as the .fl file, with +the leading directory and trailing ".fl" stripped, and +".txt", ".po", or ".msg" appended depending +on the Internationalization Mode.

File/Quit (Alt+q)

Exits FLUID. You are asked for confirmation if you have changed the current data. @@ -546,6 +552,9 @@ to actually change. generated by FLUID. If you check the "Include .h from .cxx" button the code file will include the header file automatically. +

The internationalization options are described later in +this chapter. +

New/Code/Function

Creates a new C function. You will be asked for a name for the function. This name should be a legal C++ function template, without @@ -871,4 +880,54 @@ as for xpm files. Notice that the conversion removes the compression, so the code may be much bigger than the .gif file. Only the first image of an animated gif file is used.

Behavior and performance with large .gif files is not guaranteed!

+

Internationalization with FLUID

+

FLUID supports internationalization (I18N for short) of label strings +used by widgets. The preferences window (Alt+p) provides access +to the I18N options. +

I18N Methods

+

FLUID supports three methods of I18N: use none, use GNU gettext, and +use POSIX catgets. The "use none" method is the default and just passes the +label strings as-is to the widget constructors. +

The "GNU gettext" method uses GNU gettext (or a similar text-based I18N +library) to retrieve a localized string before calling the widget +constructor. +

The "POSIX catgets" method uses the POSIX catgets function to retrieve a +numbered message from a message catalog before calling the widget +constructor. +

Using GNU gettext for I18N

+

FLUID's code support for GNU gettext is limited to calling a function or +macro to retrieve the localized label; you still need to call +setlocale() and textdomain() or bindtextdomain() +to select the appropriate language and message file. +

To use GNU gettext for I18N, open the preferences window and choose +"GNU gettext" from the "Use" chooser. Two new input fields will then +appear to control the include file and function/macro name to use when +retrieving the localized label strings. +

+

The "#include" field controls the header file to include for I18N; by +default this is <libintl.h>, the standard I18N file for +GNU gettext. +

The "Function" field controls the function (or macro) that will +retrieve the localized message; by default the gettext +function will be called. + +

Using POSIX catgets for I18N

+

FLUID's code support for POSIX catgets allows you to use a global message +file for all interfaces or a file specific to each .fl file; you still +need to call setlocale() to select the appropriate language. +

To use POSIX catgets for I18N, open the preferences window and choose +"POSIX catgets" from the "Use" chooser. Three new input fields will then +appear to control the include file, catalog file, and set number for +retrieving the localized label strings. +

+

The "#include" field controls the header file to include for I18N; by +default this is <nl_types.h>, the standard I18N file for +POSIX catgets. +

The "File" field controls the name of the catalog file variable to +use when retrieving localized messages; by default the file field is +empty which forces a local (static) catalog file to be used for all +of the windows defined in your .fl file. +

The "Set" field controls the set number in the catalog file. The default +set is 1 and rarely needs to be changed. + -- cgit v1.2.3