summaryrefslogtreecommitdiff
path: root/documentation/fluid.html
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/fluid.html')
-rw-r--r--documentation/fluid.html59
1 files changed, 59 insertions, 0 deletions
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 <tt>-c</tt> switch.
<P>The output file names are the same as the <TT>.fl</TT> file, with
the leading directory and trailing &quot;.fl&quot; stripped, and
&quot;.h&quot; or &quot;.cxx&quot; appended. </P>
+<H4>File/Write Messages (Alt+Shift+W)</H4>
+Writes a message file for all of the text labels defined in the current file.
+<P>The output file name is the same as the <TT>.fl</TT> file, with
+the leading directory and trailing &quot;.fl&quot; stripped, and
+&quot;.txt&quot;, &quot;.po&quot;, or &quot;.msg&quot; appended depending
+on the <A HREF="#I18N">Internationalization Mode</A>. </P>
<H4>File/Quit (Alt+q)</H4>
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.
+<P>The internationalization options are described <A HREF="#I18N">later in
+this chapter</A>.
+
<H4>New/Code/Function</H4>
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. </P>
<P>Behavior and performance with large .gif files is not guaranteed! </P>
+<H2><A NAME="I18N">Internationalization with FLUID</A></H2>
+<P>FLUID supports internationalization (I18N for short) of label strings
+used by widgets. The preferences window (<TT>Alt+p</TT>) provides access
+to the I18N options.
+<H3>I18N Methods</H3>
+<P>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.
+<P>The "GNU gettext" method uses GNU gettext (or a similar text-based I18N
+library) to retrieve a localized string before calling the widget
+constructor.
+<P>The "POSIX catgets" method uses the POSIX catgets function to retrieve a
+numbered message from a message catalog before calling the widget
+constructor.
+<H3>Using GNU gettext for I18N</H3>
+<P>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
+<TT>setlocale()</TT> and <TT>textdomain()</TT> or <TT>bindtextdomain()</TT>
+to select the appropriate language and message file.
+<P>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.
+<P ALIGN="CENTER"><IMG SRC="fluid-gettext.gif"></P>
+<P>The "#include" field controls the header file to include for I18N; by
+default this is <TT>&lt;libintl.h&gt;</TT>, the standard I18N file for
+GNU gettext.
+<P>The "Function" field controls the function (or macro) that will
+retrieve the localized message; by default the <TT>gettext</TT>
+function will be called.
+
+<H3>Using POSIX catgets for I18N</H3>
+<P>FLUID's code support for POSIX catgets allows you to use a global message
+file for all interfaces or a file specific to each <TT>.fl</TT> file; you still
+need to call <TT>setlocale()</TT> to select the appropriate language.
+<P>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.
+<P ALIGN="CENTER"><IMG SRC="fluid-catgets.gif"></P>
+<P>The "#include" field controls the header file to include for I18N; by
+default this is <TT>&lt;nl_types.h&gt;</TT>, the standard I18N file for
+POSIX catgets.
+<P>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 <TT>.fl</TT> file.
+<P>The "Set" field controls the set number in the catalog file. The default
+set is 1 and rarely needs to be changed.
+
</BODY></HTML>