@code{LINGUAS} should then contain a space separated list of two-letter
codes, stating which languages are allowed.
+GNU @code{gettext} uses *.its and *.loc files (@pxref{Preparing ITS Rules})
+from other packages, provided they are installed in
+@file{@var{prefix}/share/gettext/its/},
+where @code{@var{prefix}} is the value of the @code{--prefix} option
+passed to @code{gettext}'s @code{configure} script.
+So, this is the canonical location for installing *.its and *.loc files
+from other packages.
+
@node Programming Languages
@chapter Other Programming Languages
For either operation modes, the @samp{-o} and @samp{--template}
options are mandatory.
+If your XML file is not of one of the types covered by the system-wide
+installed *.its files,
+you need a particular *.its file and a corresponding *.loc file
+(@pxref{Preparing ITS Rules}).
+Furthermore you need to store these files
+in a directory @file{@var{parent_dir}/its/}
+@vindex GETTEXTDATADIRS@r{, environment variable}
+and set the environment variable @code{GETTEXTDATADIRS} to include
+@code{@var{parent_dir}}.
+More generally, the value of @code{GETTEXTDATADIRS} should be
+a colon-separated list of directory names.
+
@subsection Input file syntax
@table @samp
cases, like strings in preprocessor macros, ANSI concatenation of
adjacent strings, and escaped end of lines for continued strings.
+@subsection Options for XML input files
+
+When some of the input files are XML files
+and they are not of one of the types covered
+by the system-wide installed *.its files,
+a *.its file is needed for each such file type,
+so that @code{xgettext} can handle them.
+There are two ways to specify such a file:
+
+@itemize @bullet
+@item
+@table @samp
+@item --its=@var{file}
+@opindex --its@r{, @code{xgettext} option}
+Use the ITS rules defined in @var{file}.
+@end table
+
+@item
+The environment variable @code{GETTEXTDATADIRS}.
+Together with the *.its file, you need a corresponding *.loc file
+(@pxref{Preparing ITS Rules}).
+Furthermore you need to store these files
+in a directory @file{@var{parent_dir}/its/}
+@vindex GETTEXTDATADIRS@r{, environment variable}
+and set the environment variable @code{GETTEXTDATADIRS} to include
+@code{@var{parent_dir}}.
+More generally, the value of @code{GETTEXTDATADIRS} should be
+a colon-separated list of directory names.
+@end itemize
+
+Note that when the option @code{--its} is specified,
+the system-wide installed *.its files are ignored
+and the environment variable @code{GETTEXTDATADIRS} has no effect either.
+
@subsection Output details
@c --no-escape and --escape omitted on purpose. They are not useful.
Write out a NeXTstep/GNUstep localized resource file in @code{.strings} syntax.
Note that this file format doesn't support plural forms.
-@item --its=@var{file}
-@opindex --its@r{, @code{xgettext} option}
-Use ITS rules defined in @var{file}.
-Note that this is only effective with XML files.
-
@item --itstool
@opindex --itstool@r{, @code{xgettext} option}
Write out comments recognized by itstool (@uref{http://itstool.org}).
The order in the path is as follows:
1. $GETTEXTDATADIR or GETTEXTDATADIR
+ (used by the test suite)
2. $GETTEXTDATADIRS
+ (used by users who install their own *.its and *.loc files)
3. $XDG_DATA_DIRS, where each element is suffixed with "gettext"
- 4. $GETTEXTDATADIR or GETTEXTDATADIR, suffixed with PACKAGE_SUFFIX */
+ (this is where distributions install *.its and *.loc files from
+ other packages)
+ 4. $GETTEXTDATADIR or GETTEXTDATADIR, suffixed with PACKAGE_SUFFIX
+ (this is where gettext's *.its and *.loc files are installed) */
char **
get_search_path (const char *sub)
{