This is gettext.info, produced by makeinfo version 4.6 from gettext.texi. INFO-DIR-SECTION GNU Gettext Utilities START-INFO-DIR-ENTRY * gettext: (gettext). GNU gettext utilities. * autopoint: (gettext)autopoint Invocation. Copy gettext infrastructure. * gettextize: (gettext)gettextize Invocation. Prepare a package for gettext. * msgattrib: (gettext)msgattrib Invocation. Select part of a PO file. * msgcat: (gettext)msgcat Invocation. Combine several PO files. * msgcmp: (gettext)msgcmp Invocation. Compare a PO file and template. * msgcomm: (gettext)msgcomm Invocation. Match two PO files. * msgconv: (gettext)msgconv Invocation. Convert PO file to encoding. * msgen: (gettext)msgen Invocation. Create an English PO file. * msgexec: (gettext)msgexec Invocation. Process a PO file. * msgfilter: (gettext)msgfilter Invocation. Pipe a PO file through a filter. * msgfmt: (gettext)msgfmt Invocation. Make MO files out of PO files. * msggrep: (gettext)msggrep Invocation. Select part of a PO file. * msginit: (gettext)msginit Invocation. Create a fresh PO file. * msgmerge: (gettext)msgmerge Invocation. Update a PO file from template. * msgunfmt: (gettext)msgunfmt Invocation. Uncompile MO file into PO file. * msguniq: (gettext)msguniq Invocation. Unify duplicates for PO file. * xgettext: (gettext)xgettext Invocation. Extract strings into a PO file. * ISO639: (gettext)Language Codes. ISO 639 language codes. * ISO3166: (gettext)Country Codes. ISO 3166 country codes. END-INFO-DIR-ENTRY This file provides documentation for GNU `gettext' utilities. It also serves as a reference for the free Translation Project. Copyright (C) 1995-1998, 2001-2003 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Foundation. File: gettext.info, Node: Information Flow, Next: Prioritizing messages, Prev: Organization, Up: Translators Information Flow ================ There will surely be some discussion about this messages after the packages are finally released. If people now send you some proposals for better messages, how do you proceed? Jim, please note that right now, as I put forward nearly a dozen of localizable programs, I receive both the translations and the coordination concerns about them. If I put one of my things to pretest, Ulrich receives the announcement and passes it on to the German team, who make last minute revisions. Then he submits the translation files to me _as the maintainer_. For free packages I do not maintain, I would not even hear about it. This scheme could be made to work for the whole Translation Project, I think. For security reasons, maybe Ulrich (national coordinators, in fact) should update central registry kept at the Translation Project (Jim, me, or Len's recruits) once in a while. In December/January, I was aggressively ready to internationalize all of GNU, giving myself the duty of one small GNU package per week or so, taking many weeks or months for bigger packages. But it does not work this way. I first did all the things I'm responsible for. I've nothing against some missionary work on other maintainers, but I'm also loosing a lot of energy over it--same debates over again. And when the first localized packages are released we'll get a lot of responses about ugly translations :-). Surely, and we need to have beforehand a fairly good idea about how to handle the information flow between the national teams and the package maintainers. Please start saving somewhere a quick history of each PO file. I know for sure that the file format will change, allowing for comments. It would be nice that each file has a kind of log, and references for those who want to submit comments or gripes, or otherwise contribute. I sent a proposal for a fast and flexible format, but it is not receiving acceptance yet by the GNU deciders. I'll tell you when I have more information about this. File: gettext.info, Node: Prioritizing messages, Prev: Information Flow, Up: Translators Prioritizing messages: How to determine which messages to translate first ========================================================================= A translator sometimes has only a limited amount of time per week to spend on a package, and some packages have quite large message catalogs (over 1000 messages). Therefore she wishes to translate the messages first that are the most visible to the user, or that occur most frequently. This section describes how to determine these "most urgent" messages. It also applies to determine the "next most urgent" messages after the message catalog has already been partially translated. In a first step, she uses the programs like a user would do. While she does this, the GNU `gettext' library logs into a file the not yet translated messages for which a translation was requested from the program. In a second step, she uses the PO mode to translate precisely this set of messages. Here a more details. The GNU `libintl' library (but not the corresponding functions in GNU `libc') supports an environment variable `GETTEXT_LOG_UNTRANSLATED'. The GNU `libintl' library will log into this file the messages for which `gettext()' and related functions couldn't find the translation. If the file doesn't exist, it will be created as needed. On systems with GNU `libc' a shared library `preloadable_libintl.so' is provided that can be used with the ELF `LD_PRELOAD' mechanism. So, in the first step, the translator uses these commands on systems with GNU `libc': $ LD_PRELOAD=/usr/local/lib/preloadable_libintl.so $ export LD_PRELOAD $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused $ export GETTEXT_LOG_UNTRANSLATED and these commands on other systems: $ GETTEXT_LOG_UNTRANSLATED=$HOME/gettextlogused $ export GETTEXT_LOG_UNTRANSLATED Then she uses and peruses the programs. (It is a good and recommended practice to use the programs for which you provide translations: it gives you the needed context.) When done, she removes the environment variables: $ unset LD_PRELOAD $ unset GETTEXT_LOG_UNTRANSLATED The second step starts with removing duplicates: $ msguniq $HOME/gettextlogused > missing.po The result is a PO file, but needs some preprocessing before the Emacs PO mode can be used with it. First, it is a multi-domain PO file, containing messages from many translation domains. Second, it lacks all translator comments and source references. Here is how to get a list of the affected translation domains: $ sed -n -e 's,^domain "\(.*\)"$,\1,p' < missing.po | sort | uniq Then the translator can handle the domains one by one. For simplicity, let's use environment variables to denote the language, domain and source package. $ lang=nl # your language $ domain=coreutils # the name of the domain to be handled $ package=/usr/src/gnu/coreutils-4.5.4 # the package where it comes from She takes the latest copy of `$lang.po' from the Translation Project, or from the package (in most cases, `$package/po/$lang.po'), or creates a fresh one if she's the first translator (see *Note Creating::). She then uses the following commands to mark the not urgent messages as "obsolete". (This doesn't mean that these messages - translated and untranslated ones - will go away. It simply means that Emacs PO mode will ignore them in the following editing session.) $ msggrep --domain=$domain missing.po | grep -v '^domain' \ > $domain-missing.po $ msgattrib --set-obsolete --ignore-file $domain-missing.po $domain.$lang.po \ > $domain.$lang-urgent.po The she translates `$domain.$lang-urgent.po' by use of Emacs PO mode. (FIXME: I don't know whether `KBabel' and `gtranslator' also preserve obsolete messages, as they should.) Finally she restores the not urgent messages (with their earlier translations, for those which were already translated) through this command: $ msgmerge --no-fuzzy-matching $domain.$lang-urgent.po $package/po/$domain.pot \ > $domain.$lang.po Then she can submit `$domain.$lang.po' and proceed to the next domain. File: gettext.info, Node: Maintainers, Next: Programming Languages, Prev: Translators, Up: Top The Maintainer's View ********************* The maintainer of a package has many responsibilities. One of them is ensuring that the package will install easily on many platforms, and that the magic we described earlier (*note Users::) will work for installers and end users. Of course, there are many possible ways by which GNU `gettext' might be integrated in a distribution, and this chapter does not cover them in all generality. Instead, it details one possible approach which is especially adequate for many free software distributions following GNU standards, or even better, Gnits standards, because GNU `gettext' is purposely for helping the internationalization of the whole GNU project, and as many other good free packages as possible. So, the maintainer's view presented here presumes that the package already has a `configure.in' file and uses GNU Autoconf. Nevertheless, GNU `gettext' may surely be useful for free packages not following GNU standards and conventions, but the maintainers of such packages might have to show imagination and initiative in organizing their distributions so `gettext' work for them in all situations. There are surely many, out there. Even if `gettext' methods are now stabilizing, slight adjustments might be needed between successive `gettext' versions, so you should ideally revise this chapter in subsequent releases, looking for changes. * Menu: * Flat and Non-Flat:: Flat or Non-Flat Directory Structures * Prerequisites:: Prerequisite Works * gettextize Invocation:: Invoking the `gettextize' Program * Adjusting Files:: Files You Must Create or Alter * autoconf macros:: Autoconf macros for use in `configure.in' * CVS Issues:: Integrating with CVS File: gettext.info, Node: Flat and Non-Flat, Next: Prerequisites, Prev: Maintainers, Up: Maintainers Flat or Non-Flat Directory Structures ===================================== Some free software packages are distributed as `tar' files which unpack in a single directory, these are said to be "flat" distributions. Other free software packages have a one level hierarchy of subdirectories, using for example a subdirectory named `doc/' for the Texinfo manual and man pages, another called `lib/' for holding functions meant to replace or complement C libraries, and a subdirectory `src/' for holding the proper sources for the package. These other distributions are said to be "non-flat". We cannot say much about flat distributions. A flat directory structure has the disadvantage of increasing the difficulty of updating to a new version of GNU `gettext'. Also, if you have many PO files, this could somewhat pollute your single directory. Also, GNU `gettext''s libintl sources consist of C sources, shell scripts, `sed' scripts and complicated Makefile rules, which don't fit well into an existing flat structure. For these reasons, we recommend to use non-flat approach in this case as well. Maybe because GNU `gettext' itself has a non-flat structure, we have more experience with this approach, and this is what will be described in the remaining of this chapter. Some maintainers might use this as an opportunity to unflatten their package structure. File: gettext.info, Node: Prerequisites, Next: gettextize Invocation, Prev: Flat and Non-Flat, Up: Maintainers Prerequisite Works ================== There are some works which are required for using GNU `gettext' in one of your package. These works have some kind of generality that escape the point by point descriptions used in the remainder of this chapter. So, we describe them here. * Before attempting to use `gettextize' you should install some other packages first. Ensure that recent versions of GNU `m4', GNU Autoconf and GNU `gettext' are already installed at your site, and if not, proceed to do this first. If you get to install these things, beware that GNU `m4' must be fully installed before GNU Autoconf is even _configured_. To further ease the task of a package maintainer the `automake' package was designed and implemented. GNU `gettext' now uses this tool and the `Makefile's in the `intl/' and `po/' therefore know about all the goals necessary for using `automake' and `libintl' in one project. Those four packages are only needed by you, as a maintainer; the installers of your own package and end users do not really need any of GNU `m4', GNU Autoconf, GNU `gettext', or GNU `automake' for successfully installing and running your package, with messages properly translated. But this is not completely true if you provide internationalized shell scripts within your own package: GNU `gettext' shall then be installed at the user site if the end users want to see the translation of shell script messages. * Your package should use Autoconf and have a `configure.in' or `configure.ac' file. If it does not, you have to learn how. The Autoconf documentation is quite well written, it is a good idea that you print it and get familiar with it. * Your C sources should have already been modified according to instructions given earlier in this manual. *Note Sources::. * Your `po/' directory should receive all PO files submitted to you by the translator teams, each having `LL.po' as a name. This is not usually easy to get translation work done before your package gets internationalized and available! Since the cycle has to start somewhere, the easiest for the maintainer is to start with absolutely no PO files, and wait until various translator teams get interested in your package, and submit PO files. It is worth adding here a few words about how the maintainer should ideally behave with PO files submissions. As a maintainer, your role is to authenticate the origin of the submission as being the representative of the appropriate translating teams of the Translation Project (forward the submission to `translation@iro.umontreal.ca' in case of doubt), to ensure that the PO file format is not severely broken and does not prevent successful installation, and for the rest, to merely put these PO files in `po/' for distribution. As a maintainer, you do not have to take on your shoulders the responsibility of checking if the translations are adequate or complete, and should avoid diving into linguistic matters. Translation teams drive themselves and are fully responsible of their linguistic choices for the Translation Project. Keep in mind that translator teams are _not_ driven by maintainers. You can help by carefully redirecting all communications and reports from users about linguistic matters to the appropriate translation team, or explain users how to reach or join their team. The simplest might be to send them the `ABOUT-NLS' file. Maintainers should _never ever_ apply PO file bug reports themselves, short-cutting translation teams. If some translator has difficulty to get some of her points through her team, it should not be an option for her to directly negotiate translations with maintainers. Teams ought to settle their problems themselves, if any. If you, as a maintainer, ever think there is a real problem with a team, please never try to _solve_ a team's problem on your own. File: gettext.info, Node: gettextize Invocation, Next: Adjusting Files, Prev: Prerequisites, Up: Maintainers Invoking the `gettextize' Program ================================= The `gettextize' program is an interactive tool that helps the maintainer of a package internationalized through GNU `gettext'. It is used for two purposes: * As a wizard, when a package is modified to use GNU `gettext' for the first time. * As a migration tool, for upgrading the GNU `gettext' support in a package from a previous to a newer version of GNU `gettext'. This program performs the following tasks: * It copies into the package some files that are consistently and identically needed in every package internationalized through GNU `gettext'. * It performs as many of the tasks mentioned in the next section *Note Adjusting Files:: as can be performed automatically. * It removes obsolete files and idioms used for previous GNU `gettext' versions to the form recommended for the current GNU `gettext' version. * It prints a summary of the tasks that ought to be done manually and could not be done automatically by `gettextize'. It can be invoked as follows: gettextize [ OPTION... ] [ DIRECTORY ] and accepts the following options: `-c' `--copy' Copy the needed files instead of making symbolic links. Using links would allow the package to always use the latest `gettext' code available on the system, but it might disturb some mechanism the maintainer is used to apply to the sources. Because running `gettextize' is easy there shouldn't be problems with using copies. `-f' `--force' Force replacement of files which already exist. `--intl' Install the libintl sources in a subdirectory named `intl/'. This libintl will be used to provide internationalization on systems that don't have GNU libintl installed. If this option is omitted, the call to `AM_GNU_GETTEXT' in `configure.in' should read: `AM_GNU_GETTEXT([external])', and internationalization will not be enabled on systems lacking GNU gettext. `--no-changelog' Don't update or create ChangeLog files. By default, `gettextize' logs all changes (file additions, modifications and removals) in a file called `ChangeLog' in each affected directory. `-n' `--dry-run' Print modifications but don't perform them. All actions that `gettextize' would normally execute are inhibited and instead only listed on standard output. `--help' Display this help and exit. `--version' Output version information and exit. If DIRECTORY is given, this is the top level directory of a package to prepare for using GNU `gettext'. If not given, it is assumed that the current directory is the top level directory of such a package. The program `gettextize' provides the following files. However, no existing file will be replaced unless the option `--force' (`-f') is specified. 1. The `ABOUT-NLS' file is copied in the main directory of your package, the one being at the top level. This file gives the main indications about how to install and use the Native Language Support features of your program. You might elect to use a more recent copy of this `ABOUT-NLS' file than the one provided through `gettextize', if you have one handy. You may also fetch a more recent copy of file `ABOUT-NLS' from Translation Project sites, and from most GNU archive sites. 2. A `po/' directory is created for eventually holding all translation files, but initially only containing the file `po/Makefile.in.in' from the GNU `gettext' distribution (beware the double `.in' in the file name) and a few auxiliary files. If the `po/' directory already exists, it will be preserved along with the files it contains, and only `Makefile.in.in' and the auxiliary files will be overwritten. 3. Only if `--intl' has been specified: A `intl/' directory is created and filled with most of the files originally in the `intl/' directory of the GNU `gettext' distribution. Also, if option `--force' (`-f') is given, the `intl/' directory is emptied first. 4. The files `config.rpath' and `mkinstalldirs' are copied into the directory containing configuration support files. It is needed by the `AM_GNU_GETTEXT' autoconf macro. 5. Only if the project is using GNU `automake': A set of `autoconf' macro files is copied into the package's `autoconf' macro repository, usually in a directory called `m4/'. If your site support symbolic links, `gettextize' will not actually copy the files into your package, but establish symbolic links instead. This avoids duplicating the disk space needed in all packages. Merely using the `-h' option while creating the `tar' archive of your distribution will resolve each link by an actual copy in the distribution archive. So, to insist, you really should use `-h' option with `tar' within your `dist' goal of your main `Makefile.in'. Furthermore, `gettextize' will update all `Makefile.am' files in each affected directory, as well as the top level `configure.in' or `configure.ac' file. It is interesting to understand that most new files for supporting GNU `gettext' facilities in one package go in `intl/', `po/' and `m4/' subdirectories. One distinction between `intl/' and the two other directories is that `intl/' is meant to be completely identical in all packages using GNU `gettext', while the other directories will mostly contain package dependent files. The `gettextize' program makes backup files for all files it replaces or changes, and also write ChangeLog entries about these changes. This way, the careful maintainer can check after running `gettextize' whether its changes are acceptable to him, and possibly adjust them. An exception to this rule is the `intl/' directory, which is added or replaced or removed as a whole. It is important to understand that `gettextize' can not do the entire job of adapting a package for using GNU `gettext'. The amount of remaining work depends on whether the package uses GNU `automake' or not. But in any case, the maintainer should still read the section *Note Adjusting Files:: after invoking `gettextize'. It is also important to understand that `gettextize' is not part of the GNU build system, in the sense that it should not be invoked automatically, and not be invoked by someone who doesn't assume the responsibilities of a package maintainer. For the latter purpose, a separate tool is provided, see *Note autopoint Invocation::. File: gettext.info, Node: Adjusting Files, Next: autoconf macros, Prev: gettextize Invocation, Up: Maintainers Files You Must Create or Alter ============================== Besides files which are automatically added through `gettextize', there are many files needing revision for properly interacting with GNU `gettext'. If you are closely following GNU standards for Makefile engineering and auto-configuration, the adaptations should be easier to achieve. Here is a point by point description of the changes needed in each. So, here comes a list of files, each one followed by a description of all alterations it needs. Many examples are taken out from the GNU `gettext' 0.13 distribution itself, or from the GNU `hello' distribution (`http://www.franken.de/users/gnu/ke/hello' or `http://www.gnu.franken.de/ke/hello/') You may indeed refer to the source code of the GNU `gettext' and GNU `hello' packages, as they are intended to be good examples for using GNU gettext functionality. * Menu: * po/POTFILES.in:: `POTFILES.in' in `po/' * po/LINGUAS:: `LINGUAS' in `po/' * po/Makevars:: `Makefile' pieces in `po/' * configure.in:: `configure.in' at top level * config.guess:: `config.guess', `config.sub' at top level * mkinstalldirs:: `mkinstalldirs' at top level * aclocal:: `aclocal.m4' at top level * acconfig:: `acconfig.h' at top level * config.h.in:: `config.h.in' at top level * Makefile:: `Makefile.in' at top level * src/Makefile:: `Makefile.in' in `src/' * lib/gettext.h:: `gettext.h' in `lib/' File: gettext.info, Node: po/POTFILES.in, Next: po/LINGUAS, Prev: Adjusting Files, Up: Adjusting Files `POTFILES.in' in `po/' ---------------------- The `po/' directory should receive a file named `POTFILES.in'. This file tells which files, among all program sources, have marked strings needing translation. Here is an example of such a file: # List of source files containing translatable strings. # Copyright (C) 1995 Free Software Foundation, Inc. # Common library files lib/error.c lib/getopt.c lib/xmalloc.c # Package source files src/gettext.c src/msgfmt.c src/xgettext.c Hash-marked comments and white lines are ignored. All other lines list those source files containing strings marked for translation (*note Mark Keywords::), in a notation relative to the top level of your whole distribution, rather than the location of the `POTFILES.in' file itself. When a C file is automatically generated by a tool, like `flex' or `bison', that doesn't introduce translatable strings by itself, it is recommended to list in `po/POTFILES.in' the real source file (ending in `.l' in the case of `flex', or in `.y' in the case of `bison'), not the generated C file. File: gettext.info, Node: po/LINGUAS, Next: po/Makevars, Prev: po/POTFILES.in, Up: Adjusting Files `LINGUAS' in `po/' ------------------ The `po/' directory should also receive a file named `LINGUAS'. This file contains the list of available translations. It is a whitespace separated list. Hash-marked comments and white lines are ignored. Here is an example file: # Set of available languages. de fr This example means that German and French PO files are available, so that these languages are currently supported by your package. If you want to further restrict, at installation time, the set of installed languages, this should not be done by modifying the `LINGUAS' file, but rather by using the `LINGUAS' environment variable (*note Installers::). It is recommended that you add the "languages" `en@quot' and `en@boldquot' to the `LINGUAS' file. `en@quot' is a variant of English message catalogs (`en') which uses real quotation marks instead of the ugly looking asymmetric ASCII substitutes ``' and `''. `en@boldquot' is a variant of `en@quot' that additionally outputs quoted pieces of text in a bold font, when used in a terminal emulator which supports the VT100 escape sequences (such as `xterm' or the Linux console, but not Emacs in `M-x shell' mode). These extra message catalogs `en@quot' and `en@boldquot' are constructed automatically, not by translators; to support them, you need the files `Rules-quot', `quot.sed', `boldquot.sed', `en@quot.header', `en@boldquot.header', `insert-header.sin' in the `po/' directory. You can copy them from GNU gettext's `po/' directory; they are also installed by running `gettextize'. File: gettext.info, Node: po/Makevars, Next: configure.in, Prev: po/LINGUAS, Up: Adjusting Files `Makefile' pieces in `po/' -------------------------- The `po/' directory also has a file named `Makevars'. It can be left unmodified if your package has a single message domain and, accordingly, a single `po/' directory. Only packages which have multiple `po/' directories at different locations need to adjust the three variables defined in `Makevars'. `po/Makevars' gets inserted into the `po/Makefile' when the latter is created. At the same time, all files called `Rules-*' in the `po/' directory get appended to the `po/Makefile'. They present an opportunity to add rules for special PO files to the Makefile, without needing to mess with `po/Makefile.in.in'. GNU gettext comes with a `Rules-quot' file, containing rules for building catalogs `en@quot.po' and `en@boldquot.po'. The effect of `en@quot.po' is that people who set their `LANGUAGE' environment variable to `en@quot' will get messages with proper looking symmetric Unicode quotation marks instead of abusing the ASCII grave accent and the ASCII apostrophe for indicating quotations. To enable this catalog, simply add `en@quot' to the `po/LINGUAS' file. The effect of `en@boldquot.po' is that people who set `LANGUAGE' to `en@boldquot' will get not only proper quotation marks, but also the quoted text will be shown in a bold font on terminals and consoles. This catalog is useful only for command-line programs, not GUI programs. To enable it, similarly add `en@boldquot' to the `po/LINGUAS' file. File: gettext.info, Node: configure.in, Next: config.guess, Prev: po/Makevars, Up: Adjusting Files `configure.in' at top level --------------------------- `configure.in' or `configure.ac' - this is the source from which `autoconf' generates the `configure' script. 1. Declare the package and version. This is done by a set of lines like these: PACKAGE=gettext VERSION=0.13 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) or, if you are using GNU `automake', by a line like this: AM_INIT_AUTOMAKE(gettext, 0.13) Of course, you replace `gettext' with the name of your package, and `0.13' by its version numbers, exactly as they should appear in the packaged `tar' file name of your distribution (`gettext-0.13.tar.gz', here). 2. Check for internationalization support. Here is the main `m4' macro for triggering internationalization support. Just add this line to `configure.in': AM_GNU_GETTEXT This call is purposely simple, even if it generates a lot of configure time checking and actions. If you have suppressed the `intl/' subdirectory by calling `gettextize' without `--intl' option, this call should read AM_GNU_GETTEXT([external]) 3. Have output files created. The `AC_OUTPUT' directive, at the end of your `configure.in' file, needs to be modified in two ways: AC_OUTPUT([EXISTING CONFIGURATION FILES intl/Makefile po/Makefile.in], [EXISTING ADDITIONAL ACTIONS]) The modification to the first argument to `AC_OUTPUT' asks for substitution in the `intl/' and `po/' directories. Note the `.in' suffix used for `po/' only. This is because the distributed file is really `po/Makefile.in.in'. If you have suppressed the `intl/' subdirectory by calling `gettextize' without `--intl' option, then you don't need to add `intl/Makefile' to the `AC_OUTPUT' line. File: gettext.info, Node: config.guess, Next: mkinstalldirs, Prev: configure.in, Up: Adjusting Files `config.guess', `config.sub' at top level ----------------------------------------- If you haven't suppressed the `intl/' subdirectory, you need to add the GNU `config.guess' and `config.sub' files to your distribution. They are needed because the `intl/' directory has platform dependent support for determining the locale's character encoding and therefore needs to identify the platform. You can obtain the newest version of `config.guess' and `config.sub' from `ftp://ftp.gnu.org/pub/gnu/config/'. Less recent versions are also contained in the GNU `automake' and GNU `libtool' packages. Normally, `config.guess' and `config.sub' are put at the top level of a distribution. But it is also possible to put them in a subdirectory, altogether with other configuration support files like `install-sh', `ltconfig', `ltmain.sh', `mkinstalldirs' or `missing'. All you need to do, other than moving the files, is to add the following line to your `configure.in'. AC_CONFIG_AUX_DIR([SUBDIR]) File: gettext.info, Node: mkinstalldirs, Next: aclocal, Prev: config.guess, Up: Adjusting Files `mkinstalldirs' at top level ---------------------------- If `gettextize' has not already done it, you need to add the GNU `mkinstalldirs' script to your distribution. It is needed because `mkdir -p' is not portable enough. You find this script in the GNU `automake' distribution. Normally, `mkinstalldirs' is put at the top level of a distribution. But it is also possible to put it in a subdirectory, altogether with other configuration support files like `install-sh', `ltconfig', `ltmain.sh' or `missing'. All you need to do, other than moving the files, is to add the following line to your `configure.in'. AC_CONFIG_AUX_DIR([SUBDIR]) File: gettext.info, Node: aclocal, Next: acconfig, Prev: mkinstalldirs, Up: Adjusting Files `aclocal.m4' at top level ------------------------- If you do not have an `aclocal.m4' file in your distribution, the simplest is to concatenate the files `codeset.m4', `gettext.m4', `glibc21.m4', `iconv.m4', `intdiv0.m4', `intmax.m4', `inttypes.m4', `inttypes_h.m4', `inttypes-pri.m4', `isc-posix.m4', `lcmessage.m4', `lib-ld.m4', `lib-link.m4', `lib-prefix.m4', `longdouble.m4', `longlong.m4', `printf-posix.m4', `progtest.m4', `signed.m4', `size_max.m4', `stdint_h.m4', `uintmax_t.m4', `ulonglong.m4', `wchar_t.m4', `wint_t.m4', `xsize.m4' from GNU `gettext''s `m4/' directory into a single file. If you have suppressed the `intl/' directory, only `gettext.m4', `iconv.m4', `lib-ld.m4', `lib-link.m4', `lib-prefix.m4', `progtest.m4' need to be concatenated. If you already have an `aclocal.m4' file, then you will have to merge the said macro files into your `aclocal.m4'. Note that if you are upgrading from a previous release of GNU `gettext', you should most probably _replace_ the macros (`AM_GNU_GETTEXT', etc.), as they usually change a little from one release of GNU `gettext' to the next. Their contents may vary as we get more experience with strange systems out there. If you are using GNU `automake' 1.5 or newer, it is enough to put these macro files into a subdirectory named `m4/' and add the line ACLOCAL_AMFLAGS = -I m4 to your top level `Makefile.am'. These macros check for the internationalization support functions and related informations. Hopefully, once stabilized, these macros might be integrated in the standard Autoconf set, because this piece of `m4' code will be the same for all projects using GNU `gettext'. File: gettext.info, Node: acconfig, Next: config.h.in, Prev: aclocal, Up: Adjusting Files `acconfig.h' at top level ------------------------- Earlier GNU `gettext' releases required to put definitions for `ENABLE_NLS', `HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY', `PACKAGE' and `VERSION' into an `acconfig.h' file. This is not needed any more; you can remove them from your `acconfig.h' file unless your package uses them independently from the `intl/' directory. File: gettext.info, Node: config.h.in, Next: Makefile, Prev: acconfig, Up: Adjusting Files `config.h.in' at top level -------------------------- The include file template that holds the C macros to be defined by `configure' is usually called `config.h.in' and may be maintained either manually or automatically. If it is maintained automatically, by use of the `autoheader' program, you need to do nothing about it. This is the case in particular if you are using GNU `automake'. If it is maintained manually, and if `gettextize' has created an `intl/' directory, you should switch to using `autoheader'. The list of C macros to be added for the sake of the `intl/' directory is just too long to be maintained manually; it also changes between different versions of GNU `gettext'. If it is maintained manually, and if on the other hand you have suppressed the `intl/' directory by calling `gettextize' without `--intl' option, then you can get away by adding the following lines to `config.h.in': /* Define to 1 if translation of program messages to the user's native language is requested. */ #undef ENABLE_NLS File: gettext.info, Node: Makefile, Next: src/Makefile, Prev: config.h.in, Up: Adjusting Files `Makefile.in' at top level -------------------------- Here are a few modifications you need to make to your main, top-level `Makefile.in' file. 1. Add the following lines near the beginning of your `Makefile.in', so the `dist:' goal will work properly (as explained further down): PACKAGE = @PACKAGE@ VERSION = @VERSION@ 2. Add file `ABOUT-NLS' to the `DISTFILES' definition, so the file gets distributed. 3. Wherever you process subdirectories in your `Makefile.in', be sure you also process the subdirectories `intl' and `po'. Special rules in the `Makefiles' take care for the case where no internationalization is wanted. If you are using Makefiles, either generated by automake, or hand-written so they carefully follow the GNU coding standards, the effected goals for which the new subdirectories must be handled include `installdirs', `install', `uninstall', `clean', `distclean'. Here is an example of a canonical order of processing. In this example, we also define `SUBDIRS' in `Makefile.in' for it to be further used in the `dist:' goal. SUBDIRS = doc intl lib src po Note that you must arrange for `make' to descend into the `intl' directory before descending into other directories containing code which make use of the `libintl.h' header file. For this reason, here we mention `intl' before `lib' and `src'. 4. A delicate point is the `dist:' goal, as both `intl/Makefile' and `po/Makefile' will later assume that the proper directory has been set up from the main `Makefile'. Here is an example at what the `dist:' goal might look like: distdir = $(PACKAGE)-$(VERSION) dist: Makefile rm -fr $(distdir) mkdir $(distdir) chmod 777 $(distdir) for file in $(DISTFILES); do \ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ done for subdir in $(SUBDIRS); do \ mkdir $(distdir)/$$subdir || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done tar chozf $(distdir).tar.gz $(distdir) rm -fr $(distdir) Note that if you are using GNU `automake', `Makefile.in' is automatically generated from `Makefile.am', and all needed changes to `Makefile.am' are already made by running `gettextize'. File: gettext.info, Node: src/Makefile, Next: lib/gettext.h, Prev: Makefile, Up: Adjusting Files `Makefile.in' in `src/' ----------------------- Some of the modifications made in the main `Makefile.in' will also be needed in the `Makefile.in' from your package sources, which we assume here to be in the `src/' subdirectory. Here are all the modifications needed in `src/Makefile.in': 1. In view of the `dist:' goal, you should have these lines near the beginning of `src/Makefile.in': PACKAGE = @PACKAGE@ VERSION = @VERSION@ 2. If not done already, you should guarantee that `top_srcdir' gets defined. This will serve for `cpp' include files. Just add the line: top_srcdir = @top_srcdir@ 3. You might also want to define `subdir' as `src', later allowing for almost uniform `dist:' goals in all your `Makefile.in'. At list, the `dist:' goal below assume that you used: subdir = src 4. The `main' function of your program will normally call `bindtextdomain' (see *note Triggering::), like this: bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); To make LOCALEDIR known to the program, add the following lines to Makefile.in: datadir = @datadir@ localedir = $(datadir)/locale DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ Note that `@datadir@' defaults to `$(prefix)/share', thus `$(localedir)' defaults to `$(prefix)/share/locale'. 5. You should ensure that the final linking will use `@LIBINTL@' or `@LTLIBINTL@' as a library. `@LIBINTL@' is for use without `libtool', `@LTLIBINTL@' is for use with `libtool'. An easy way to achieve this is to manage that it gets into `LIBS', like this: LIBS = @LIBINTL@ @LIBS@ In most packages internationalized with GNU `gettext', one will find a directory `lib/' in which a library containing some helper functions will be build. (You need at least the few functions which the GNU `gettext' Library itself needs.) However some of the functions in the `lib/' also give messages to the user which of course should be translated, too. Taking care of this, the support library (say `libsupport.a') should be placed before `@LIBINTL@' and `@LIBS@' in the above example. So one has to write this: LIBS = ../lib/libsupport.a @LIBINTL@ @LIBS@ 6. You should also ensure that directory `intl/' will be searched for C preprocessor include files in all circumstances. So, you have to manage so both `-I../intl' and `-I$(top_srcdir)/intl' will be given to the C compiler. 7. Your `dist:' goal has to conform with others. Here is a reasonable definition for it: distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) dist: Makefile $(DISTFILES) for file in $(DISTFILES); do \ ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \ done File: gettext.info, Node: lib/gettext.h, Prev: src/Makefile, Up: Adjusting Files `gettext.h' in `lib/' --------------------- Internationalization of packages, as provided by GNU `gettext', is optional. It can be turned off in two situations: * When the installer has specified `./configure --disable-nls'. This can be useful when small binaries are more important than features, for example when building utilities for boot diskettes. It can also be useful in order to get some specific C compiler warnings about code quality with some older versions of GCC (older than 3.0). * When the package does not include the `intl/' subdirectory, and the libintl.h header (with its associated libintl library, if any) is not already installed on the system, it is preferrable that the package builds without internationalization support, rather than to give a compilation error. A C preprocessor macro can be used to detect these two cases. Usually, when `libintl.h' was found and not explicitly disabled, the `ENABLE_NLS' macro will be defined to 1 in the autoconf generated configuration file (usually called `config.h'). In the two negative situations, however, this macro will not be defined, thus it will evaluate to 0 in C preprocessor expressions. `gettext.h' is a convenience header file for conditional use of `<libintl.h>', depending on the `ENABLE_NLS' macro. If `ENABLE_NLS' is set, it includes `<libintl.h>'; otherwise it defines no-op substitutes for the libintl.h functions. We recommend the use of `"gettext.h"' over direct use of `<libintl.h>', so that portability to older systems is guaranteed and installers can turn off internationalization if they want to. In the C code, you will then write #include "gettext.h" instead of #include <libintl.h> The location of `gettext.h' is usually in a directory containing auxiliary include files. In many GNU packages, there is a directory `lib/' containing helper functions; `gettext.h' fits there. In other packages, it can go into the `src' directory. Do not install the `gettext.h' file in public locations. Every package that needs it should contain a copy of it on its own. File: gettext.info, Node: autoconf macros, Next: CVS Issues, Prev: Adjusting Files, Up: Maintainers Autoconf macros for use in `configure.in' ========================================= GNU `gettext' installs macros for use in a package's `configure.in' or `configure.ac'. *Note Introduction: (autoconf)Top. The primary macro is, of course, `AM_GNU_GETTEXT'. * Menu: * AM_GNU_GETTEXT:: AM_GNU_GETTEXT in `gettext.m4' * AM_GNU_GETTEXT_VERSION:: AM_GNU_GETTEXT_VERSION in `gettext.m4' * AM_PO_SUBDIRS:: AM_PO_SUBDIRS in `po.m4' * AM_ICONV:: AM_ICONV in `iconv.m4' File: gettext.info, Node: AM_GNU_GETTEXT, Next: AM_GNU_GETTEXT_VERSION, Prev: autoconf macros, Up: autoconf macros AM_GNU_GETTEXT in `gettext.m4' ------------------------------ The `AM_GNU_GETTEXT' macro tests for the presence of the GNU gettext function family in either the C library or a separate `libintl' library (shared or static libraries are both supported) or in the package's `intl/' directory. It also invokes `AM_PO_SUBDIRS', thus preparing the `po/' directories of the package for building. `AM_GNU_GETTEXT' accepts up to three optional arguments. The general syntax is AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]) INTLSYMBOL can be `external' or `no-libtool'. The default (if it is not specified or empty) is `no-libtool'. INTLSYMBOL should be `external' for packages with no `intl/' directory, and `no-libtool' for packages with an `intl/' directory. In the latter case, a static library `$(top_builddir)/intl/libintl.a' will be created. If NEEDSYMBOL is specified and is `need-ngettext', then GNU gettext implementations (in libc or libintl) without the `ngettext()' function will be ignored. If NEEDSYMBOL is specified and is `need-formatstring-macros', then GNU gettext implementations that don't support the ISO C 99 `<inttypes.h>' formatstring macros will be ignored. Only one NEEDSYMBOL can be specified. To specify more than one requirement, just specify the strongest one among them. The hierarchy among the various alternatives is as follows: `need-formatstring-macros' implies `need-ngettext'. INTLDIR is used to find the intl libraries. If empty, the value `$(top_builddir)/intl/' is used. The `AM_GNU_GETTEXT' macro determines whether GNU gettext is available and should be used. If so, it sets the `USE_NLS' variable to `yes'; it defines `ENABLE_NLS' to 1 in the autoconf generated configuration file (usually called `config.h'); it sets the variables `LIBINTL' and `LTLIBINTL' to the linker options for use in a Makefile (`LIBINTL' for use without libtool, `LTLIBINTL' for use with libtool); it adds an `-I' option to `CPPFLAGS' if necessary. In the negative case, it sets `USE_NLS' to `no'; it sets `LIBINTL' and `LTLIBINTL' to empty and doesn't change `CPPFLAGS'. The complexities that `AM_GNU_GETTEXT' deals with are the following: * Some operating systems have `gettext' in the C library, for example glibc. Some have it in a separate library `libintl'. GNU `libintl' might have been installed as part of the GNU `gettext' package. * GNU `libintl', if installed, is not necessarily already in the search path (`CPPFLAGS' for the include file search path, `LDFLAGS' for the library search path). * Except for glibc, the operating system's native `gettext' cannot exploit the GNU mo files, doesn't have the necessary locale dependency features, and cannot convert messages from the catalog's text encoding to the user's locale encoding. * GNU `libintl', if installed, is not necessarily already in the run time library search path. To avoid the need for setting an environment variable like `LD_LIBRARY_PATH', the macro adds the appropriate run time search path options to the `LIBINTL' and `LTLIBINTL' variables. This works on most systems, but not on some operating systems with limited shared library support, like SCO. * GNU `libintl' relies on POSIX/XSI `iconv'. The macro checks for linker options needed to use iconv and appends them to the `LIBINTL' and `LTLIBINTL' variables. File: gettext.info, Node: AM_GNU_GETTEXT_VERSION, Next: AM_PO_SUBDIRS, Prev: AM_GNU_GETTEXT, Up: autoconf macros AM_GNU_GETTEXT_VERSION in `gettext.m4' -------------------------------------- The `AM_GNU_GETTEXT_VERSION' macro declares the version number of the GNU gettext infrastructure that is used by the package. The use of this macro is optional; only the `autopoint' program makes use of it (*note CVS Issues::). File: gettext.info, Node: AM_PO_SUBDIRS, Next: AM_ICONV, Prev: AM_GNU_GETTEXT_VERSION, Up: autoconf macros AM_PO_SUBDIRS in `po.m4' ------------------------ The `AM_PO_SUBDIRS' macro prepares the `po/' directories of the package for building. This macro should be used in internationalized programs written in other programming languages than C, C++, Objective C, for example `sh', `Python', `Lisp'. See *Note Programming Languages:: for a list of programming languages that support localization through PO files. The `AM_PO_SUBDIRS' macro determines whether internationalization should be used. If so, it sets the `USE_NLS' variable to `yes', otherwise to `no'. It also determines the right values for Makefile variables in each `po/' directory. File: gettext.info, Node: AM_ICONV, Prev: AM_PO_SUBDIRS, Up: autoconf macros AM_ICONV in `iconv.m4' ---------------------- The `AM_ICONV' macro tests for the presence of the POSIX/XSI `iconv' function family in either the C library or a separate `libiconv' library. If found, it sets the `am_cv_func_iconv' variable to `yes'; it defines `HAVE_ICONV' to 1 in the autoconf generated configuration file (usually called `config.h'); it defines `ICONV_CONST' to `const' or to empty, depending on whether the second argument of `iconv()' is of type `const char **' or `char **'; it sets the variables `LIBICONV' and `LTLIBICONV' to the linker options for use in a Makefile (`LIBICONV' for use without libtool, `LTLIBICONV' for use with libtool); it adds an `-I' option to `CPPFLAGS' if necessary. If not found, it sets `LIBICONV' and `LTLIBICONV' to empty and doesn't change `CPPFLAGS'. The complexities that `AM_ICONV' deals with are the following: * Some operating systems have `iconv' in the C library, for example glibc. Some have it in a separate library `libiconv', for example OSF/1 or FreeBSD. Regardless of the operating system, GNU `libiconv' might have been installed. In that case, it should be used instead of the operating system's native `iconv'. * GNU `libiconv', if installed, is not necessarily already in the search path (`CPPFLAGS' for the include file search path, `LDFLAGS' for the library search path). * GNU `libiconv' is binary incompatible with some operating system's native `iconv', for example on FreeBSD. Use of an `iconv.h' and `libiconv.so' that don't fit together would produce program crashes. * GNU `libiconv', if installed, is not necessarily already in the run time library search path. To avoid the need for setting an environment variable like `LD_LIBRARY_PATH', the macro adds the appropriate run time search path options to the `LIBICONV' variable. This works on most systems, but not on some operating systems with limited shared library support, like SCO. `iconv.m4' is distributed with the GNU gettext package because `gettext.m4' relies on it. File: gettext.info, Node: CVS Issues, Prev: autoconf macros, Up: Maintainers Integrating with CVS ==================== Many projects use CVS for distributed development, version control and source backup. This section gives some advice how to manage the uses of `cvs', `gettextize', `autopoint' and `autoconf'. * Menu: * Distributed CVS:: Avoiding version mismatch in distributed development * Files under CVS:: Files to put under CVS version control * autopoint Invocation:: Invoking the `autopoint' Program File: gettext.info, Node: Distributed CVS, Next: Files under CVS, Prev: CVS Issues, Up: CVS Issues Avoiding version mismatch in distributed development ---------------------------------------------------- In a project development with multiple developers, using CVS, there should be a single developer who occasionally - when there is desire to upgrade to a new `gettext' version - runs `gettextize' and performs the changes listed in *Note Adjusting Files::, and then commits his changes to the CVS. It is highly recommended that all developers on a project use the same version of GNU `gettext' in the package. In other words, if a developer runs `gettextize', he should go the whole way, make the necessary remaining changes and commit his changes to the CVS. Otherwise the following damages will likely occur: * Apparent version mismatch between developers. Since some `gettext' specific portions in `configure.in', `configure.ac' and `Makefile.am', `Makefile.in' files depend on the `gettext' version, the use of infrastructure files belonging to different `gettext' versions can easily lead to build errors. * Hidden version mismatch. Such version mismatch can also lead to malfunctioning of the package, that may be undiscovered by the developers. The worst case of hidden version mismatch is that internationalization of the package doesn't work at all. * Release risks. All developers implicitly perform constant testing on a package. This is important in the days and weeks before a release. If the guy who makes the release tar files uses a different version of GNU `gettext' than the other developers, the distribution will be less well tested than if all had been using the same `gettext' version. For example, it is possible that a platform specific bug goes undiscovered due to this constellation. File: gettext.info, Node: Files under CVS, Next: autopoint Invocation, Prev: Distributed CVS, Up: CVS Issues Files to put under CVS version control -------------------------------------- There are basically three ways to deal with generated files in the context of a CVS repository, such as `configure' generated from `configure.in', `PARSER.c' generated from `PARSER.y', or `po/Makefile.in.in' autoinstalled by `gettextize' or `autopoint'. 1. All generated files are always committed into the repository. 2. All generated files are committed into the repository occasionally, for example each time a release is made. 3. Generated files are never committed into the repository. Each of these three approaches has different advantages and drawbacks. 1. The advantage is that anyone can check out the CVS at any moment and gets a working build. The drawbacks are: 1a. It requires some frequent "cvs commit" actions by the maintainers. 1b. The repository grows in size quite fast. 2. The advantage is that anyone can check out the CVS, and the usual "./configure; make" will work. The drawbacks are: 2a. The one who checks out the repository needs tools like GNU `automake', GNU `autoconf', GNU `m4' installed in his PATH; sometimes he even needs particular versions of them. 2b. When a release is made and a commit is made on the generated files, the other developers get conflicts on the generated files after doing "cvs update". Although these conflicts are easy to resolve, they are annoying. 3. The advantage is less work for the maintainers. The drawback is that anyone who checks out the CVS not only needs tools like GNU `automake', GNU `autoconf', GNU `m4' installed in his PATH, but also that he needs to perform a package specific pre-build step before being able to "./configure; make". For the first and second approach, all files modified or brought in by the occasional `gettextize' invocation and update should be committed into the CVS. For the third approach, the maintainer can omit from the CVS repository all the files that `gettextize' mentions as "copy". Instead, he adds to the `configure.in' or `configure.ac' a line of the form AM_GNU_GETTEXT_VERSION(0.13) and adds to the package's pre-build script an invocation of `autopoint'. For everyone who checks out the CVS, this `autopoint' invocation will copy into the right place the `gettext' infrastructure files that have been omitted from the CVS. File: gettext.info, Node: autopoint Invocation, Prev: Files under CVS, Up: CVS Issues Invoking the `autopoint' Program -------------------------------- autopoint [OPTION]... The `autopoint' program copies standard gettext infrastructure files into a source package. It extracts from a macro call of the form `AM_GNU_GETTEXT_VERSION(VERSION)', found in the package's `configure.in' or `configure.ac' file, the gettext version used by the package, and copies the infrastructure files belonging to this version into the package. Options ....... `-f' `--force' Force overwriting of files that already exist. `-n' `--dry-run' Print modifications but don't perform them. All file copying actions that `autopoint' would normally execute are inhibited and instead only listed on standard output. Informative output .................. `--help' Display this help and exit. `--version' Output version information and exit. `autopoint' supports the GNU `gettext' versions from 0.10.35 to the current one, 0.13. In order to apply `autopoint' to a package using a `gettext' version newer than 0.13, you need to install this same version of GNU `gettext' at least. In packages using GNU `automake', an invocation of `autopoint' should be followed by invocations of `aclocal' and then `autoconf' and `autoheader'. The reason is that `autopoint' installs some autoconf macro files, which are used by `aclocal' to create `aclocal.m4', and the latter is used by `autoconf' to create the package's `configure' script and by `autoheader' to create the package's `config.h.in' include file template. The name `autopoint' is an abbreviation of `auto-po-intl-m4'; the tool copies or updates mostly files in the `po', `intl', `m4' directories. File: gettext.info, Node: Programming Languages, Next: Conclusion, Prev: Maintainers, Up: Top Other Programming Languages *************************** While the presentation of `gettext' focuses mostly on C and implicitly applies to C++ as well, its scope is far broader than that: Many programming languages, scripting languages and other textual data like GUI resources or package descriptions can make use of the gettext approach. * Menu: * Language Implementors:: The Language Implementor's View * Programmers for other Languages:: The Programmer's View * Translators for other Languages:: The Translator's View * Maintainers for other Languages:: The Maintainer's View * List of Programming Languages:: Individual Programming Languages * List of Data Formats:: Internationalizable Data File: gettext.info, Node: Language Implementors, Next: Programmers for other Languages, Prev: Programming Languages, Up: Programming Languages The Language Implementor's View =============================== All programming and scripting languages that have the notion of strings are eligible to supporting `gettext'. Supporting `gettext' means the following: 1. You should add to the language a syntax for translatable strings. In principle, a function call of `gettext' would do, but a shorthand syntax helps keeping the legibility of internationalized programs. For example, in C we use the syntax `_("string")', and in GNU awk we use the shorthand `_"string"'. 2. You should arrange that evaluation of such a translatable string at runtime calls the `gettext' function, or performs equivalent processing. 3. Similarly, you should make the functions `ngettext', `dcgettext', `dcngettext' available from within the language. These functions are less often used, but are nevertheless necessary for particular purposes: `ngettext' for correct plural handling, and `dcgettext' and `dcngettext' for obeying other locale environment variables than `LC_MESSAGES', such as `LC_TIME' or `LC_MONETARY'. For these latter functions, you need to make the `LC_*' constants, available in the C header `<locale.h>', referenceable from within the language, usually either as enumeration values or as strings. 4. You should allow the programmer to designate a message domain, either by making the `textdomain' function available from within the language, or by introducing a magic variable called `TEXTDOMAIN'. Similarly, you should allow the programmer to designate where to search for message catalogs, by providing access to the `bindtextdomain' function. 5. You should either perform a `setlocale (LC_ALL, "")' call during the startup of your language runtime, or allow the programmer to do so. Remember that gettext will act as a no-op if the `LC_MESSAGES' and `LC_CTYPE' locale facets are not both set. 6. A programmer should have a way to extract translatable strings from a program into a PO file. The GNU `xgettext' program is being extended to support very different programming languages. Please contact the GNU `gettext' maintainers to help them doing this. If the string extractor is best integrated into your language's parser, GNU `xgettext' can function as a front end to your string extractor. 7. The language's library should have a string formatting facility where the arguments of a format string are denoted by a positional number or a name. This is needed because for some languages and some messages with more than one substitutable argument, the translation will need to output the substituted arguments in different order. *Note c-format Flag::. 8. If the language has more than one implementation, and not all of the implementations use `gettext', but the programs should be portable across implementations, you should provide a no-i18n emulation, that makes the other implementations accept programs written for yours, without actually translating the strings. 9. To help the programmer in the task of marking translatable strings, which is usually performed using the Emacs PO mode, you are welcome to contact the GNU `gettext' maintainers, so they can add support for your language to `po-mode.el'. On the implementation side, three approaches are possible, with different effects on portability and copyright: * You may integrate the GNU `gettext''s `intl/' directory in your package, as described in *Note Maintainers::. This allows you to have internationalization on all kinds of platforms. Note that when you then distribute your package, it legally falls under the GNU General Public License, and the GNU project will be glad about your contribution to the Free Software pool. * You may link against GNU `gettext' functions if they are found in the C library. For example, an autoconf test for `gettext()' and `ngettext()' will detect this situation. For the moment, this test will succeed on GNU systems and not on other platforms. No severe copyright restrictions apply. * You may emulate or reimplement the GNU `gettext' functionality. This has the advantage of full portability and no copyright restrictions, but also the drawback that you have to reimplement the GNU `gettext' features (such as the `LANGUAGE' environment variable, the locale aliases database, the automatic charset conversion, and plural handling). File: gettext.info, Node: Programmers for other Languages, Next: Translators for other Languages, Prev: Language Implementors, Up: Programming Languages The Programmer's View ===================== For the programmer, the general procedure is the same as for the C language. The Emacs PO mode supports other languages, and the GNU `xgettext' string extractor recognizes other languages based on the file extension or a command-line option. In some languages, `setlocale' is not needed because it is already performed by the underlying language runtime. File: gettext.info, Node: Translators for other Languages, Next: Maintainers for other Languages, Prev: Programmers for other Languages, Up: Programming Languages The Translator's View ===================== The translator works exactly as in the C language case. The only difference is that when translating format strings, she has to be aware of the language's particular syntax for positional arguments in format strings. * Menu: * c-format:: C Format Strings * objc-format:: Objective C Format Strings * sh-format:: Shell Format Strings * python-format:: Python Format Strings * lisp-format:: Lisp Format Strings * elisp-format:: Emacs Lisp Format Strings * librep-format:: librep Format Strings * smalltalk-format:: Smalltalk Format Strings * java-format:: Java Format Strings * awk-format:: awk Format Strings * object-pascal-format:: Object Pascal Format Strings * ycp-format:: YCP Format Strings * tcl-format:: Tcl Format Strings * perl-format:: Perl Format Strings * php-format:: PHP Format Strings * gcc-internal-format:: GCC internal Format Strings * qt-format:: Qt Format Strings File: gettext.info, Node: c-format, Next: objc-format, Prev: Translators for other Languages, Up: Translators for other Languages C Format Strings ---------------- C format strings are described in POSIX (IEEE P1003.1 2001), section XSH 3 fprintf(), `http://www.opengroup.org/onlinepubs/007904975/functions/fprintf.html'. See also the fprintf(3) manual page, `http://www.linuxvalley.it/encyclopedia/ldp/manpage/man3/printf.3.php', `http://informatik.fh-wuerzburg.de/student/i510/man/printf.html'. Although format strings with positions that reorder arguments, such as "Only %2$d bytes free on '%1$s'." which is semantically equivalent to "'%s' has only %d bytes free." are a POSIX/XSI feature and not specified by ISO C 99, translators can rely on this reordering ability: On the few platforms where `printf()', `fprintf()' etc. don't support this feature natively, `libintl.a' or `libintl.so' provides replacement functions, and GNU `<libintl.h>' activates these replacement functions automatically. File: gettext.info, Node: objc-format, Next: sh-format, Prev: c-format, Up: Translators for other Languages Objective C Format Strings -------------------------- Objective C format strings are like C format strings. They support an additional format directive: "$@", which when executed consumes an argument of type `Object *'. File: gettext.info, Node: sh-format, Next: python-format, Prev: objc-format, Up: Translators for other Languages Shell Format Strings -------------------- Shell format strings, as supported by GNU gettext and the `envsubst' program, are strings with references to shell variables in the form `$VARIABLE' or `${VARIABLE}'. References of the form `${VARIABLE-DEFAULT}', `${VARIABLE:-DEFAULT}', `${VARIABLE=DEFAULT}', `${VARIABLE:=DEFAULT}', `${VARIABLE+REPLACEMENT}', `${VARIABLE:+REPLACEMENT}', `${VARIABLE?IGNORED}', `${VARIABLE:?IGNORED}', that would be valid inside shell scripts, are not supported. The VARIABLE names must consist solely of alphanumeric or underscore ASCII characters, not start with a digit and be nonempty; otherwise such a variable reference is ignored. File: gettext.info, Node: python-format, Next: lisp-format, Prev: sh-format, Up: Translators for other Languages Python Format Strings --------------------- Python format strings are described in Python Library reference / 2. Built-in Types, Exceptions and Functions / 2.2. Built-in Types / 2.2.6. Sequence Types / 2.2.6.2. String Formatting Operations. `http://www.python.org/doc/2.2.1/lib/typesseq-strings.html'. File: gettext.info, Node: lisp-format, Next: elisp-format, Prev: python-format, Up: Translators for other Languages Lisp Format Strings ------------------- Lisp format strings are described in the Common Lisp HyperSpec, chapter 22.3 Formatted Output, `http://www.lisp.org/HyperSpec/Body/sec_22-3.html'. File: gettext.info, Node: elisp-format, Next: librep-format, Prev: lisp-format, Up: Translators for other Languages Emacs Lisp Format Strings ------------------------- Emacs Lisp format strings are documented in the Emacs Lisp reference, section Formatting Strings, `http://www.gnu.org/manual/elisp-manual-21-2.8/html_chapter/elisp_4.html#SEC75'. Note that as of version 21, XEmacs supports numbered argument specifications in format strings while FSF Emacs doesn't. File: gettext.info, Node: librep-format, Next: smalltalk-format, Prev: elisp-format, Up: Translators for other Languages librep Format Strings --------------------- librep format strings are documented in the librep manual, section Formatted Output, <http://librep.sourceforge.net/librep-manual.html#Formatted%20Output>, <http://www.gwinnup.org/research/docs/librep.html#SEC122>. File: gettext.info, Node: smalltalk-format, Next: java-format, Prev: librep-format, Up: Translators for other Languages Smalltalk Format Strings ------------------------ Smalltalk format strings are described in the GNU Smalltalk documentation, class `CharArray', methods `bindWith:' and `bindWithArguments:'. `http://www.gnu.org/software/smalltalk/gst-manual/gst_68.html#SEC238'. In summary, a directive starts with `%' and is followed by `%' or a nonzero digit (`1' to `9'). File: gettext.info, Node: java-format, Next: awk-format, Prev: smalltalk-format, Up: Translators for other Languages Java Format Strings ------------------- Java format strings are described in the JDK documentation for class `java.text.MessageFormat', `http://java.sun.com/j2se/1.4/docs/api/java/text/MessageFormat.html'. See also the ICU documentation `http://oss.software.ibm.com/icu/apiref/classMessageFormat.html'. File: gettext.info, Node: awk-format, Next: object-pascal-format, Prev: java-format, Up: Translators for other Languages awk Format Strings ------------------ awk format strings are described in the gawk documentation, section Printf, `http://www.gnu.org/manual/gawk/html_node/Printf.html#Printf'. File: gettext.info, Node: object-pascal-format, Next: ycp-format, Prev: awk-format, Up: Translators for other Languages Object Pascal Format Strings ---------------------------- Where is this documented? File: gettext.info, Node: ycp-format, Next: tcl-format, Prev: object-pascal-format, Up: Translators for other Languages YCP Format Strings ------------------ YCP sformat strings are described in the libycp documentation `file:/usr/share/doc/packages/libycp/YCP-builtins.html'. In summary, a directive starts with `%' and is followed by `%' or a nonzero digit (`1' to `9'). File: gettext.info, Node: tcl-format, Next: perl-format, Prev: ycp-format, Up: Translators for other Languages Tcl Format Strings ------------------ Tcl format strings are described in the `format.n' manual page, `http://www.scriptics.com/man/tcl8.3/TclCmd/format.htm'. File: gettext.info, Node: perl-format, Next: php-format, Prev: tcl-format, Up: Translators for other Languages Perl Format Strings ------------------- There are two kinds format strings in Perl: those acceptable to the Perl built-in function `printf', labelled as `perl-format', and those acceptable to the `libintl-perl' function `__x', labelled as `perl-brace-format'. Perl `printf' format strings are described in the `sprintf' section of `man perlfunc'. Perl brace format strings are described in the `Locale::TextDomain(3pm)' manual page of the CPAN package libintl-perl. In brief, Perl format uses placeholders put between braces (`{' and `}'). The placeholder must have the syntax of simple identifiers. File: gettext.info, Node: php-format, Next: gcc-internal-format, Prev: perl-format, Up: Translators for other Languages PHP Format Strings ------------------ PHP format strings are described in the documentation of the PHP function `sprintf', in `phpdoc/manual/function.sprintf.html' or `http://www.php.net/manual/en/function.sprintf.php'. File: gettext.info, Node: gcc-internal-format, Next: qt-format, Prev: php-format, Up: Translators for other Languages GCC internal Format Strings --------------------------- These format strings are used inside the GCC sources. In such a format string, a directive starts with `%', is optionally followed by a size specifier `l', an optional flag `+', another optional flag `#', and is finished by a specifier: `%' denotes a literal percent sign, `c' denotes a character, `s' denotes a string, `i' and `d' denote an integer, `o', `u', `x' denote an unsigned integer, `.*s' denotes a string preceded by a width specification, `H' denotes a `location_t *' pointer, `D' denotes a general declaration, `F' denotes a function declaration, `T' denotes a type, `A' denotes a function argument, `C' denotes a tree code, `E' denotes an expression, `L' denotes a programming language, `O' denotes a binary operator, `P' denotes a function parameter, `Q' denotes an assignment operator, `V' denotes a const/volatile qualifier. File: gettext.info, Node: qt-format, Prev: gcc-internal-format, Up: Translators for other Languages Qt Format Strings ----------------- Qt format strings are described in the documentation of the QString class `file:/usr/lib/qt-3.0.5/doc/html/qstring.html'. In summary, a directive consists of a `%' followed by a digit. The same directive cannot occur more than once in a format string. File: gettext.info, Node: Maintainers for other Languages, Next: List of Programming Languages, Prev: Translators for other Languages, Up: Programming Languages The Maintainer's View ===================== For the maintainer, the general procedure differs from the C language case in two ways. * For those languages that don't use GNU gettext, the `intl/' directory is not needed and can be omitted. This means that the maintainer calls the `gettextize' program without the `--intl' option, and that he invokes the `AM_GNU_GETTEXT' autoconf macro via `AM_GNU_GETTEXT([external])'. * If only a single programming language is used, the `XGETTEXT_OPTIONS' variable in `po/Makevars' (*note po/Makevars::) should be adjusted to match the `xgettext' options for that particular programming language. If the package uses more than one programming language with `gettext' support, it becomes necessary to change the POT file construction rule in `po/Makefile.in.in'. It is recommended to make one `xgettext' invocation per programming language, each with the options appropriate for that language, and to combine the resulting files using `msgcat'. File: gettext.info, Node: List of Programming Languages, Next: List of Data Formats, Prev: Maintainers for other Languages, Up: Programming Languages Individual Programming Languages ================================ * Menu: * C:: C, C++, Objective C * sh:: sh - Shell Script * bash:: bash - Bourne-Again Shell Script * Python:: Python * Common Lisp:: GNU clisp - Common Lisp * clisp C:: GNU clisp C sources * Emacs Lisp:: Emacs Lisp * librep:: librep * Smalltalk:: GNU Smalltalk * Java:: Java * gawk:: GNU awk * Pascal:: Pascal - Free Pascal Compiler * wxWindows:: wxWindows library * YCP:: YCP - YaST2 scripting language * Tcl:: Tcl - Tk's scripting language * Perl:: Perl * PHP:: PHP Hypertext Preprocessor * Pike:: Pike * GCC-source:: GNU Compiler Collection sources File: gettext.info, Node: C, Next: sh, Prev: List of Programming Languages, Up: List of Programming Languages C, C++, Objective C ------------------- RPMs gcc, gpp, gobjc, glibc, gettext File extension For C: `c', `h'. For C++: `C', `c++', `cc', `cxx', `cpp', `hpp'. For Objective C: `m'. String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite `#include <libintl.h>' `#include <locale.h>' `#define _(string) gettext (string)' Use or emulate GNU gettext Use Extractor `xgettext -k_' Formatting with positions `fprintf "%2$d %1$d"' In C++: `autosprintf "%2$d %1$d"' (*note Introduction: (autosprintf)Top.) Portability autoconf (gettext.m4) and #if ENABLE_NLS po-mode marking yes The following examples are available in the `examples' directory: `hello-c', `hello-c-gnome', `hello-c++', `hello-c++-qt', `hello-c++-kde', `hello-c++-gnome', `hello-objc', `hello-objc-gnustep', `hello-objc-gnome'. File: gettext.info, Node: sh, Next: bash, Prev: C, Up: List of Programming Languages sh - Shell Script ----------------- RPMs bash, gettext File extension `sh' String syntax `"abc"', `'abc'', `abc' gettext shorthand `"`gettext \"abc\"`"' gettext/ngettext functions `gettext', `ngettext' programs `eval_gettext', `eval_ngettext' shell functions textdomain environment variable `TEXTDOMAIN' bindtextdomain environment variable `TEXTDOMAINDIR' setlocale automatic Prerequisite `. gettext.sh' Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions -- Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-sh'. * Menu: * Preparing Shell Scripts:: Preparing Shell Scripts for Internationalization * gettext.sh:: Contents of `gettext.sh' * gettext Invocation:: Invoking the `gettext' program * ngettext Invocation:: Invoking the `ngettext' program * envsubst Invocation:: Invoking the `envsubst' program * eval_gettext Invocation:: Invoking the `eval_gettext' function * eval_ngettext Invocation:: Invoking the `eval_ngettext' function File: gettext.info, Node: Preparing Shell Scripts, Next: gettext.sh, Prev: sh, Up: sh Preparing Shell Scripts for Internationalization ................................................ Preparing a shell script for internationalization is conceptually similar to the steps described in *Note Sources::. The concrete steps for shell scripts are as follows. 1. Insert the line . gettext.sh near the top of the script. `gettext.sh' is a shell function library that provides the functions `eval_gettext' (see *Note eval_gettext Invocation::) and `eval_ngettext' (see *Note eval_ngettext Invocation::). You have to ensure that `gettext.sh' can be found in the `PATH'. 2. Set and export the `TEXTDOMAIN' and `TEXTDOMAINDIR' environment variables. Usually `TEXTDOMAIN' is the package or program name, and `TEXTDOMAINDIR' is the absolute pathname corresponding to `$prefix/share/locale', where `$prefix' is the installation location. TEXTDOMAIN=@PACKAGE@ export TEXTDOMAIN TEXTDOMAINDIR=@LOCALEDIR@ export TEXTDOMAINDIR 3. Prepare the strings for translation, as described in *Note Preparing Strings::. 4. Simplify translatable strings so that they don't contain command substitution (`"`...`"' or `"$(...)"'), variable access with defaulting (like `${VARIABLE-DEFAULT}'), access to positional arguments (like `$0', `$1', ...) or highly volatile shell variables (like `$?'). This can always be done through simple local code restructuring. For example, echo "Usage: $0 [OPTION] FILE..." becomes program_name=$0 echo "Usage: $program_name [OPTION] FILE..." Similarly, echo "Remaining files: `ls | wc -l`" becomes filecount="`ls | wc -l`" echo "Remaining files: $filecount" 5. For each translatable string, change the output command `echo' or `$echo' to `gettext' (if the string contains no references to shell variables) or to `eval_gettext' (if it refers to shell variables), followed by a no-argument `echo' command (to account for the terminating newline). Similarly, for cases with plural handling, replace a conditional `echo' command with an invocation of `ngettext' or `eval_ngettext', followed by a no-argument `echo' command. File: gettext.info, Node: gettext.sh, Next: gettext Invocation, Prev: Preparing Shell Scripts, Up: sh Contents of `gettext.sh' ........................ `gettext.sh', contained in the run-time package of GNU gettext, provides the following: * $echo The variable `echo' is set to a command that outputs its first argument and a newline, without interpreting backslashes in the argument string. * eval_gettext See *Note eval_gettext Invocation::. * eval_ngettext See *Note eval_ngettext Invocation::. File: gettext.info, Node: gettext Invocation, Next: ngettext Invocation, Prev: gettext.sh, Up: sh Invoking the `gettext' program .............................. gettext [OPTION] [[TEXTDOMAIN] MSGID] gettext [OPTION] -s [MSGID]... The `gettext' program displays the native language translation of a textual message. *Arguments* `-d TEXTDOMAIN' `--domain=TEXTDOMAIN' Retrieve translated messages from TEXTDOMAIN. Usually a TEXTDOMAIN corresponds to a package, a program, or a module of a program. `-e' Enable expansion of some escape sequences. This option is for compatibility with the `echo' program or shell built-in. The escape sequences `\b', `\c', `\f', `\n', `\r', `\t', `\v', `\\', and `\' followed by one to three octal digits, are interpreted like the `echo' program does. `-E' This option is only for compatibility with the `echo' program or shell built-in. It has no effect. `-h' `--help' Display this help and exit. `-n' Suppress trailing newline. By default, `gettext' adds a newline to the output. `-V' `--version' Output version information and exit. `[TEXTDOMAIN] MSGID' Retrieve translated message corresponding to MSGID from TEXTDOMAIN. If the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable `TEXTDOMAIN'. If the message catalog is not found in the regular directory, another location can be specified with the environment variable `TEXTDOMAINDIR'. When used with the `-s' option the program behaves like the `echo' command. But it does not simply copy its arguments to stdout. Instead those messages found in the selected catalog are translated. File: gettext.info, Node: ngettext Invocation, Next: envsubst Invocation, Prev: gettext Invocation, Up: sh Invoking the `ngettext' program ............................... ngettext [OPTION] [TEXTDOMAIN] MSGID MSGID-PLURAL COUNT The `ngettext' program displays the native language translation of a textual message whose grammatical form depends on a number. *Arguments* `-d TEXTDOMAIN' `--domain=TEXTDOMAIN' Retrieve translated messages from TEXTDOMAIN. Usually a TEXTDOMAIN corresponds to a package, a program, or a module of a program. `-e' Enable expansion of some escape sequences. This option is for compatibility with the `gettext' program. The escape sequences `\b', `\c', `\f', `\n', `\r', `\t', `\v', `\\', and `\' followed by one to three octal digits, are interpreted like the `echo' program does. `-E' This option is only for compatibility with the `gettext' program. It has no effect. `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. `TEXTDOMAIN' Retrieve translated message from TEXTDOMAIN. `MSGID MSGID-PLURAL' Translate MSGID (English singular) / MSGID-PLURAL (English plural). `COUNT' Choose singular/plural form based on this value. If the TEXTDOMAIN parameter is not given, the domain is determined from the environment variable `TEXTDOMAIN'. If the message catalog is not found in the regular directory, another location can be specified with the environment variable `TEXTDOMAINDIR'. File: gettext.info, Node: envsubst Invocation, Next: eval_gettext Invocation, Prev: ngettext Invocation, Up: sh Invoking the `envsubst' program ............................... envsubst [OPTION] [SHELL-FORMAT] The `envsubst' program substitutes the values of environment variables. *Operation mode* `-v' `--variables' Output the variables occurring in SHELL-FORMAT. *Informative output* `-h' `--help' Display this help and exit. `-V' `--version' Output version information and exit. In normal operation mode, standard input is copied to standard output, with references to environment variables of the form `$VARIABLE' or `${VARIABLE}' being replaced with the corresponding values. If a SHELL-FORMAT is given, only those environment variables that are referenced in SHELL-FORMAT are substituted; otherwise all environment variables references occurring in standard input are substituted. These substitutions are a subset of the substitutions that a shell performs on unquoted and double-quoted strings. Other kinds of substitutions done by a shell, such as `${VARIABLE-DEFAULT}' or `$(COMMAND-LIST)' or ``COMMAND-LIST`', are not performed by the `envsubst' program, due to security reasons. When `--variables' is used, standard input is ignored, and the output consists of the environment variables that are referenced in SHELL-FORMAT, one per line. File: gettext.info, Node: eval_gettext Invocation, Next: eval_ngettext Invocation, Prev: envsubst Invocation, Up: sh Invoking the `eval_gettext' function .................................... eval_gettext MSGID This function outputs the native language translation of a textual message, performing dollar-substitution on the result. Note that only shell variables mentioned in MSGID will be dollar-substituted in the result. File: gettext.info, Node: eval_ngettext Invocation, Prev: eval_gettext Invocation, Up: sh Invoking the `eval_ngettext' function ..................................... eval_ngettext MSGID MSGID-PLURAL COUNT This function outputs the native language translation of a textual message whose grammatical form depends on a number, performing dollar-substitution on the result. Note that only shell variables mentioned in MSGID or MSGID-PLURAL will be dollar-substituted in the result. File: gettext.info, Node: bash, Next: Python, Prev: sh, Up: List of Programming Languages bash - Bourne-Again Shell Script -------------------------------- GNU `bash' 2.0 or newer has a special shorthand for translating a string and substituting variable values in it: `$"msgid"'. But the use of this construct is *discouraged*, due to the security holes it opens and due to its portability problems. The security holes of `$"..."' come from the fact that after looking up the translation of the string, `bash' processes it like it processes any double-quoted string: dollar and backquote processing, like `eval' does. 1. In a locale whose encoding is one of BIG5, BIG5-HKSCS, GBK, GB18030, SHIFT_JIS, JOHAB, some double-byte characters have a second byte whose value is `0x60'. For example, the byte sequence `\xe0\x60' is a single character in these locales. Many versions of `bash' (all versions up to bash-2.05, and newer versions on platforms without `mbsrtowcs()' function) don't know about character boundaries and see a backquote character where there is only a particular Chinese character. Thus it can start executing part of the translation as a command list. This situation can occur even without the translator being aware of it: if the translator provides translations in the UTF-8 encoding, it is the `gettext()' function which will, during its conversion from the translator's encoding to the user's locale's encoding, produce the dangerous `\x60' bytes. 2. A translator could - voluntarily or inadvertantly - use backquotes `"`...`"' or dollar-parentheses `"$(...)"' in her translations. The enclosed strings would be executed as command lists by the shell. The portability problem is that `bash' must be built with internationalization support; this is normally not the case on systems that don't have the `gettext()' function in libc. File: gettext.info, Node: Python, Next: Common Lisp, Prev: bash, Up: List of Programming Languages Python ------ RPMs python File extension `py' String syntax `'abc'', `u'abc'', `r'abc'', `ur'abc'', `"abc"', `u"abc"', `r"abc"', `ur"abc"', `'''abc'''', `u'''abc'''', `r'''abc'''', `ur'''abc'''', `"""abc"""', `u"""abc"""', `r"""abc"""', `ur"""abc"""' gettext shorthand `_('abc')' etc. gettext/ngettext functions `gettext.gettext', `gettext.dgettext', `gettext.ngettext', `gettext.dngettext', also `ugettext', `ungettext' textdomain `gettext.textdomain' function, or `gettext.install(DOMAIN)' function bindtextdomain `gettext.bindtextdomain' function, or `gettext.install(DOMAIN,LOCALEDIR)' function setlocale not used by the gettext emulation Prerequisite `import gettext' Use or emulate GNU gettext emulate. Bug: uses only the first found .mo file, not all of them Extractor `xgettext' Formatting with positions `'...%(ident)d...' % { 'ident': value }' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-python'. File: gettext.info, Node: Common Lisp, Next: clisp C, Prev: Python, Up: List of Programming Languages GNU clisp - Common Lisp ----------------------- RPMs clisp 2.28 or newer File extension `lisp' String syntax `"abc"' gettext shorthand `(_ "abc")', `(ENGLISH "abc")' gettext/ngettext functions `i18n:gettext', `i18n:ngettext' textdomain `i18n:textdomain' bindtextdomain `i18n:textdomaindir' setlocale automatic Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext -k_ -kENGLISH' Formatting with positions `format "~1@*~D ~0@*~D"' Portability On platforms without gettext, no translation. po-mode marking -- An example is available in the `examples' directory: `hello-clisp'. File: gettext.info, Node: clisp C, Next: Emacs Lisp, Prev: Common Lisp, Up: List of Programming Languages GNU clisp C sources ------------------- RPMs clisp File extension `d' String syntax `"abc"' gettext shorthand `ENGLISH ? "abc" : ""' `GETTEXT("abc")' `GETTEXTL("abc")' gettext/ngettext functions `clgettext', `clgettextl' textdomain -- bindtextdomain -- setlocale automatic Prerequisite `#include "lispbibl.c"' Use or emulate GNU gettext use Extractor `clisp-xgettext' Formatting with positions `fprintf "%2$d %1$d"' Portability On platforms without gettext, no translation. po-mode marking -- File: gettext.info, Node: Emacs Lisp, Next: librep, Prev: clisp C, Up: List of Programming Languages Emacs Lisp ---------- RPMs emacs, xemacs File extension `el' String syntax `"abc"' gettext shorthand `(_"abc")' gettext/ngettext functions `gettext', `dgettext' (xemacs only) textdomain `domain' special form (xemacs only) bindtextdomain `bind-text-domain' function (xemacs only) setlocale automatic Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `format "%2$d %1$d"' Portability Only XEmacs. Without `I18N3' defined at build time, no translation. po-mode marking -- File: gettext.info, Node: librep, Next: Smalltalk, Prev: Emacs Lisp, Up: List of Programming Languages librep ------ RPMs librep 0.15.3 or newer File extension `jl' String syntax `"abc"' gettext shorthand `(_"abc")' gettext/ngettext functions `gettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale -- Prerequisite `(require 'rep.i18n.gettext)' Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `format "%2$d %1$d"' Portability On platforms without gettext, no translation. po-mode marking -- An example is available in the `examples' directory: `hello-librep'. File: gettext.info, Node: Smalltalk, Next: Java, Prev: librep, Up: List of Programming Languages GNU Smalltalk ------------- RPMs smalltalk File extension `st' String syntax `'abc'' gettext shorthand `NLS ? 'abc'' gettext/ngettext functions `LcMessagesDomain>>#at:', `LcMessagesDomain>>#at:plural:with:' textdomain `LcMessages>>#domain:localeDirectory:' (returns a `LcMessagesDomain' object). Example: `I18N Locale default messages domain: 'gettext' localeDirectory: /usr/local/share/locale'' bindtextdomain `LcMessages>>#domain:localeDirectory:', see above. setlocale Automatic if you use `I18N Locale default'. Prerequisite `PackageLoader fileInPackage: 'I18N'!' Use or emulate GNU gettext emulate Extractor `xgettext' Formatting with positions `'%1 %2' bindWith: 'Hello' with: 'world'' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-smalltalk'. File: gettext.info, Node: Java, Next: gawk, Prev: Smalltalk, Up: List of Programming Languages Java ---- RPMs java, java2 File extension `java' String syntax "abc" gettext shorthand _("abc") gettext/ngettext functions `GettextResource.gettext', `GettextResource.ngettext' textdomain --, use `ResourceBundle.getResource' instead bindtextdomain --, use CLASSPATH instead setlocale automatic Prerequisite -- Use or emulate GNU gettext --, uses a Java specific message catalog format Extractor `xgettext -k_' Formatting with positions `MessageFormat.format "{1,number} {0,number}"' Portability fully portable po-mode marking -- Before marking strings as internationalizable, uses of the string concatenation operator need to be converted to `MessageFormat' applications. For example, `"file "+filename+" not found"' becomes `MessageFormat.format("file {0} not found", new Object[] { filename })'. Only after this is done, can the strings be marked and extracted. GNU gettext uses the native Java internationalization mechanism, namely `ResourceBundle's. There are two formats of `ResourceBundle's: `.properties' files and `.class' files. The `.properties' format is a text file which the translators can directly edit, like PO files, but which doesn't support plural forms. Whereas the `.class' format is compiled from `.java' source code and can support plural forms (provided it is accessed through an appropriate API, see below). To convert a PO file to a `.properties' file, the `msgcat' program can be used with the option `--properties-output'. To convert a `.properties' file back to a PO file, the `msgcat' program can be used with the option `--properties-input'. All the tools that manipulate PO files can work with `.properties' files as well, if given the `--properties-input' and/or `--properties-output' option. To convert a PO file to a ResourceBundle class, the `msgfmt' program can be used with the option `--java' or `--java2'. To convert a ResourceBundle back to a PO file, the `msgunfmt' program can be used with the option `--java'. Two different programmatic APIs can be used to access ResourceBundles. Note that both APIs work with all kinds of ResourceBundles, whether GNU gettext generated classes, or other `.class' or `.properties' files. 1. The `java.util.ResourceBundle' API. In particular, its `getString' function returns a string translation. Note that a missing translation yields a `MissingResourceException'. This has the advantage of being the standard API. And it does not require any additional libraries, only the `msgcat' generated `.properties' files or the `msgfmt' generated `.class' files. But it cannot do plural handling, even if the resource was generated by `msgfmt' from a PO file with plural handling. 2. The `gnu.gettext.GettextResource' API. Reference documentation in Javadoc 1.1 style format is in the javadoc1 directory (javadoc1/tree.html) and in Javadoc 2 style format in the javadoc2 directory (javadoc2/index.html). Its `gettext' function returns a string translation. Note that when a translation is missing, the MSGID argument is returned unchanged. This has the advantage of having the `ngettext' function for plural handling. To use this API, one needs the `libintl.jar' file which is part of the GNU gettext package and distributed under the LGPL. Three examples, using the second API, are available in the `examples' directory: `hello-java', `hello-java-awt', `hello-java-swing'. File: gettext.info, Node: gawk, Next: Pascal, Prev: Java, Up: List of Programming Languages GNU awk ------- RPMs gawk 3.1 or newer File extension `awk' String syntax `"abc"' gettext shorthand `_"abc"' gettext/ngettext functions `dcgettext', missing `dcngettext' in gawk-3.1.0 textdomain `TEXTDOMAIN' variable bindtextdomain `bindtextdomain' function setlocale automatic, but missing `setlocale (LC_MESSAGES, "")' in gawk-3.1.0 Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `printf "%2$d %1$d"' (GNU awk only) Portability On platforms without gettext, no translation. On non-GNU awks, you must define `dcgettext', `dcngettext' and `bindtextdomain' yourself. po-mode marking -- An example is available in the `examples' directory: `hello-gawk'. File: gettext.info, Node: Pascal, Next: wxWindows, Prev: gawk, Up: List of Programming Languages Pascal - Free Pascal Compiler ----------------------------- RPMs fpk File extension `pp', `pas' String syntax `'abc'' gettext shorthand automatic gettext/ngettext functions --, use `ResourceString' data type instead textdomain --, use `TranslateResourceStrings' function instead bindtextdomain --, use `TranslateResourceStrings' function instead setlocale automatic, but uses only LANG, not LC_MESSAGES or LC_ALL Prerequisite `{$mode delphi}' or `{$mode objfpc}' `uses gettext;' Use or emulate GNU gettext emulate partially Extractor `ppc386' followed by `xgettext' or `rstconv' Formatting with positions `uses sysutils;' `format "%1:d %0:d"' Portability ? po-mode marking -- The Pascal compiler has special support for the `ResourceString' data type. It generates a `.rst' file. This is then converted to a `.pot' file by use of `xgettext' or `rstconv'. At runtime, a `.mo' file corresponding to translations of this `.pot' file can be loaded using the `TranslateResourceStrings' function in the `gettext' unit. An example is available in the `examples' directory: `hello-pascal'. File: gettext.info, Node: wxWindows, Next: YCP, Prev: Pascal, Up: List of Programming Languages wxWindows library ----------------- RPMs wxGTK, gettext File extension `cpp' String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `wxLocale::GetString', `wxGetTranslation' textdomain `wxLocale::AddCatalog' bindtextdomain `wxLocale::AddCatalogLookupPathPrefix' setlocale `wxLocale::Init', `wxSetLocale' Prerequisite `#include <wx/intl.h>' Use or emulate GNU gettext emulate, see `include/wx/intl.h' and `src/common/intl.cpp' Extractor `xgettext' Formatting with positions -- Portability fully portable po-mode marking yes File: gettext.info, Node: YCP, Next: Tcl, Prev: wxWindows, Up: List of Programming Languages YCP - YaST2 scripting language ------------------------------ RPMs libycp, libycp-devel, yast2-core, yast2-core-devel File extension `ycp' String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `_()' with 1 or 3 arguments textdomain `textdomain' statement bindtextdomain -- setlocale -- Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `sformat "%2 %1"' Portability fully portable po-mode marking -- An example is available in the `examples' directory: `hello-ycp'. File: gettext.info, Node: Tcl, Next: Perl, Prev: YCP, Up: List of Programming Languages Tcl - Tk's scripting language ----------------------------- RPMs tcl File extension `tcl' String syntax `"abc"' gettext shorthand `[_ "abc"]' gettext/ngettext functions `::msgcat::mc' textdomain -- bindtextdomain --, use `::msgcat::mcload' instead setlocale automatic, uses LANG, but ignores LC_MESSAGES and LC_ALL Prerequisite `package require msgcat' `proc _ {s} {return [::msgcat::mc $s]}' Use or emulate GNU gettext --, uses a Tcl specific message catalog format Extractor `xgettext -k_' Formatting with positions `format "%2\$d %1\$d"' Portability fully portable po-mode marking -- Two examples are available in the `examples' directory: `hello-tcl', `hello-tcl-tk'. Before marking strings as internationalizable, substitutions of variables into the string need to be converted to `format' applications. For example, `"file $filename not found"' becomes `[format "file %s not found" $filename]'. Only after this is done, can the strings be marked and extracted. After marking, this example becomes `[format [_ "file %s not found"] $filename]' or `[msgcat::mc "file %s not found" $filename]'. Note that the `msgcat::mc' function implicitly calls `format' when more than one argument is given. File: gettext.info, Node: Perl, Next: PHP, Prev: Tcl, Up: List of Programming Languages Perl ---- RPMs perl File extension `pl', `PL', `pm', `cgi' String syntax * `"abc"' * `'abc'' * `qq (abc)' * `q (abc)' * `qr /abc/' * `qx (/bin/date)' * `/pattern match/' * `?pattern match?' * `s/substitution/operators/' * `$tied_hash{"message"}' * `$tied_hash_reference->{"message"}' * etc., issue the command `man perlsyn' for details gettext shorthand `__' (double underscore) gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function bind_textdomain_codeset `bind_textdomain_codeset' function setlocale Use `setlocale (LC_ALL, "");' Prerequisite `use POSIX;' `use Locale::TextDomain;' (included in the package libintl-perl which is available on the Comprehensive Perl Archive Network CPAN, http://www.cpan.org/). Use or emulate GNU gettext emulate Extractor `xgettext -k__ -k\$__ -k%__ -k__x -k__n:1,2 -k__nx:1,2 -k__xn:1,2 -kN__ -k' Formatting with positions Both kinds of format strings support formatting with positions. `printf "%2\$d %1\$d", ...' (requires Perl 5.8.0 or newer) `__expand("[new] replaces [old]", old => $oldvalue, new => $newvalue)' Portability The `libintl-perl' package is platform independent but is not part of the Perl core. The programmer is responsible for providing a dummy implementation of the required functions if the package is not installed on the target system. po-mode marking -- Documentation Included in `libintl-perl', available on CPAN (http://www.cpan.org/). An example is available in the `examples' directory: `hello-perl'. The `xgettext' parser backend for Perl differs significantly from the parser backends for other programming languages, just as Perl itself differs significantly from other programming languages. The Perl parser backend offers many more string marking facilities than the other backends but it also has some Perl specific limitations, the worst probably being its imperfectness. * Menu: * General Problems:: General Problems Parsing Perl Code * Default Keywords:: Which Keywords Will xgettext Look For? * Special Keywords:: How to Extract Hash Keys * Quote-like Expressions:: What are Strings And Quote-like Expressions? * Interpolation I:: Invalid String Interpolation * Interpolation II:: Valid String Interpolation * Parentheses:: When To Use Parentheses * Long Lines:: How To Grok with Long Lines * Perl Pitfalls:: Bugs, Pitfalls, and Things That Do Not Work File: gettext.info, Node: General Problems, Next: Default Keywords, Up: Perl General Problems Parsing Perl Code .................................. It is often heard that only Perl can parse Perl. This is not true. Perl cannot be _parsed_ at all, it can only be _executed_. Perl has various built-in ambiguities that can only be resolved at runtime. The following example may illustrate one common problem: print gettext "Hello World!"; Although this example looks like a bullet-proof case of a function invocation, it is not: open gettext, ">testfile" or die; print gettext "Hello world!" In this context, the string `gettext' looks more like a file handle. But not necessarily: use Locale::Messages qw (:libintl_h); open gettext ">testfile" or die; print gettext "Hello world!"; Now, the file is probably syntactically incorrect, provided that the module `Locale::Messages' found first in the Perl include path exports a function `gettext'. But what if the module `Locale::Messages' really looks like this? use vars qw (*gettext); 1; In this case, the string `gettext' will be interpreted as a file handle again, and the above example will create a file `testfile' and write the string "Hello world!" into it. Even advanced control flow analysis will not really help: if (0.5 < rand) { eval "use Sane"; } else { eval "use InSane"; } print gettext "Hello world!"; If the module `Sane' exports a function `gettext' that does what we expect, and the module `InSane' opens a file for writing and associates the _handle_ `gettext' with this output stream, we are clueless again about what will happen at runtime. It is completely unpredictable. The truth is that Perl has so many ways to fill its symbol table at runtime that it is impossible to interpret a particular piece of code without executing it. Of course, `xgettext' will not execute your Perl sources while scanning for translatable strings, but rather use heuristics in order to guess what you meant. Another problem is the ambiguity of the slash and the question mark. Their interpretation depends on the context: # A pattern match. print "OK\n" if /foobar/; # A division. print 1 / 2; # Another pattern match. print "OK\n" if ?foobar?; # Conditional. print $x ? "foo" : "bar"; The slash may either act as the division operator or introduce a pattern match, whereas the question mark may act as the ternary conditional operator or as a pattern match, too. Other programming languages like `awk' present similar problems, but the consequences of a misinterpretation are particularly nasty with Perl sources. In `awk' for instance, a statement can never exceed one line and the parser can recover from a parsing error at the next newline and interpret the rest of the input stream correctly. Perl is different, as a pattern match is terminated by the next appearance of the delimiter (the slash or the question mark) in the input stream, regardless of the semantic context. If a slash is really a division sign but mis-interpreted as a pattern match, the rest of the input file is most probably parsed incorrectly. If you find that `xgettext' fails to extract strings from portions of your sources, you should therefore look out for slashes and/or question marks preceding these sections. You may have come across a bug in `xgettext''s Perl parser (and of course you should report that bug). In the meantime you should consider to reformulate your code in a manner less challenging to `xgettext'. File: gettext.info, Node: Default Keywords, Next: Special Keywords, Prev: General Problems, Up: Perl Which keywords will xgettext look for? ...................................... Unless you instruct `xgettext' otherwise by invoking it with one of the options `--keyword' or `-k', it will recognize the following keywords in your Perl sources: * `gettext' * `dgettext' * `dcgettext' * `ngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `dngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `dcngettext:1,2' The first (singular) and the second (plural) argument will be extracted. * `gettext_noop' * `%gettext' The keys of lookups into the hash `%gettext' will be extracted. * `$gettext' The keys of lookups into the hash reference `$gettext' will be extracted. File: gettext.info, Node: Special Keywords, Next: Quote-like Expressions, Prev: Default Keywords, Up: Perl How to Extract Hash Keys ........................ Translating messages at runtime is normally performed by looking up the original string in the translation database and returning the translated version. The "natural" Perl implementation is a hash lookup, and, of course, `xgettext' supports such practice. print __"Hello world!"; print $__{"Hello world!"}; print $__->{"Hello world!"}; print $$__{"Hello world!"}; The above four lines all do the same thing. The Perl module `Locale::TextDomain' exports by default a hash `%__' that is tied to the function `__()'. It also exports a reference `$__' to `%__'. If an argument to the `xgettext' option `--keyword', resp. `-k' starts with a percent sign, the rest of the keyword is interpreted as the name of a hash. If it starts with a dollar sign, the rest of the keyword is interpreted as a reference to a hash. Note that you can omit the quotation marks (single or double) around the hash key (almost) whenever Perl itself allows it: print $gettext{Error}; The exact rule is: You can omit the surrounding quotes, when the hash key is a valid C (!) identifier, i. e. when it starts with an underscore or an ASCII letter and is followed by an arbitrary number of underscores, ASCII letters or digits. Other Unicode characters are _not_ allowed, regardless of the `use utf8' pragma. File: gettext.info, Node: Quote-like Expressions, Next: Interpolation I, Prev: Special Keywords, Up: Perl What are Strings And Quote-like Expressions? ............................................ Perl offers a plethora of different string constructs. Those that can be used either as arguments to functions or inside braces for hash lookups are generally supported by `xgettext'. * *double-quoted strings* print gettext "Hello World!"; * *single-quoted strings* print gettext 'Hello World!'; * *the operator qq* print gettext qq |Hello World!|; print gettext qq <E-mail: <guido\@imperia.net>>; The operator `qq' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. * *the operator q* print gettext q |Hello World!|; print gettext q <E-mail: <guido@imperia.net>>; The operator `q' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. * *the operator qx* print gettext qx ;LANGUAGE=C /bin/date; print gettext qx [/usr/bin/ls | grep '^[A-Z]*']; The operator `qx' is fully supported. You can use arbitrary delimiters, including the four bracketing delimiters (round, angle, square, curly) that nest. The example is actually a useless use of `gettext'. It will invoke the `gettext' function on the output of the command specified with the `qx' operator. The feature was included in order to make the interface consistent (the parser will extract all strings and quote-like expressions). * *here documents* print gettext <<'EOF'; program not found in $PATH EOF print ngettext <<EOF, <<"EOF"; one file deleted EOF several files deleted EOF Here-documents are recognized. If the delimiter is enclosed in single quotes, the string is not interpolated. If it is enclosed in double quotes or has no quotes at all, the string is interpolated. Delimiters that start with a digit are not supported! File: gettext.info, Node: Interpolation I, Next: Interpolation II, Prev: Quote-like Expressions, Up: Perl Invalid Uses Of String Interpolation .................................... Perl is capable of interpolating variables into strings. This offers some nice features in localized programs but can also lead to problems. A common error is a construct like the following: print gettext "This is the program $0!\n"; Perl will interpolate at runtime the value of the variable `$0' into the argument of the `gettext()' function. Hence, this argument is not a string constant but a variable argument (`$0' is a global variable that holds the name of the Perl script being executed). The interpolation is performed by Perl before the string argument is passed to `gettext()' and will therefore depend on the name of the script which can only be determined at runtime. Consequently, it is almost impossible that a translation can be looked up at runtime (except if, by accident, the interpolated string is found in the message catalog). The `xgettext' program will therefore terminate parsing with a fatal error if it encounters a variable inside of an extracted string. In general, this will happen for all kinds of string interpolations that cannot be safely performed at compile time. If you absolutely know what you are doing, you can always circumvent this behavior: my $know_what_i_am_doing = "This is program $0!\n"; print gettext $know_what_i_am_doing; Since the parser only recognizes strings and quote-like expressions, but not variables or other terms, the above construct will be accepted. You will have to find another way, however, to let your original string make it into your message catalog. If invoked with the option `--extract-all', resp. `-a', variable interpolation will be accepted. Rationale: You will generally use this option in order to prepare your sources for internationalization. Please see the manual page `man perlop' for details of strings and quote-like expressions that are subject to interpolation and those that are not. Safe interpolations (that will not lead to a fatal error) are: * the escape sequences `\t' (tab, HT, TAB), `\n' (newline, NL), `\r' (return, CR), `\f' (form feed, FF), `\b' (backspace, BS), `\a' (alarm, bell, BEL), and `\e' (escape, ESC). * octal chars, like `\033' Note that octal escapes in the range of 400-777 are translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. * hex chars, like `\x1b' * wide hex chars, like `\x{263a}' Note that this escape is translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. * control chars, like `\c[' (CTRL-[) * named Unicode chars, like `\N{LATIN CAPITAL LETTER C WITH CEDILLA}' Note that this escape is translated into a UTF-8 representation, regardless of the presence of the `use utf8' pragma. The following escapes are considered partially safe: * `\l' lowercase next char * `\u' uppercase next char * `\L' lowercase till \E * `\U' uppercase till \E * `\E' end case modification * `\Q' quote non-word characters till \E These escapes are only considered safe if the string consists of ASCII characters only. Translation of characters outside the range defined by ASCII is locale-dependent and can actually only be performed at runtime; `xgettext' doesn't do these locale-dependent translations at extraction time. Except for the modifier `\Q', these translations, albeit valid, are generally useless and only obfuscate your sources. If a translation can be safely performed at compile time you can just as well write what you mean. File: gettext.info, Node: Interpolation II, Next: Parentheses, Prev: Interpolation I, Up: Perl Valid Uses Of String Interpolation .................................. Perl is often used to generate sources for other programming languages or arbitrary file formats. Web applications that output HTML code make a prominent example for such usage. You will often come across situations where you want to intersperse code written in the target (programming) language with translatable messages, like in the following HTML example: print gettext <<EOF; <h1>My Homepage</h1> <script language="JavaScript"><!-- for (i = 0; i < 100; ++i) { alert ("Thank you so much for visiting my homepage!"); } //--></script> EOF The parser will extract the entire here document, and it will appear entirely in the resulting PO file, including the JavaScript snippet embedded in the HTML code. If you exaggerate with constructs like the above, you will run the risk that the translators of your package will look out for a less challenging project. You should consider an alternative expression here: print <<EOF; <h1>$gettext{"My Homepage"}</h1> <script language="JavaScript"><!-- for (i = 0; i < 100; ++i) { alert ("$gettext{'Thank you so much for visiting my homepage!'}"); } //--></script> EOF Only the translatable portions of the code will be extracted here, and the resulting PO file will begrudgingly improve in terms of readability. You can interpolate hash lookups in all strings or quote-like expressions that are subject to interpolation (see the manual page `man perlop' for details). Double interpolation is invalid, however: # TRANSLATORS: Replace "the earth" with the name of your planet. print gettext qq{Welcome to $gettext->{"the earth"}}; The `qq'-quoted string is recognized as an argument to `xgettext' in the first place, and checked for invalid variable interpolation. The dollar sign of hash-dereferencing will therefore terminate the parser with an "invalid interpolation" error. It is valid to interpolate hash lookups in regular expressions: if ($var =~ /$gettext{"the earth"}/) { print gettext "Match!\n"; } s/$gettext{"U. S. A."}/$gettext{"U. S. A."} $gettext{"(dial +0)"}/g; File: gettext.info, Node: Parentheses, Next: Long Lines, Prev: Interpolation II, Up: Perl When To Use Parentheses ....................... In Perl, parentheses around function arguments are mostly optional. `xgettext' will always assume that all recognized keywords (except for hashs and hash references) are names of properly prototyped functions, and will (hopefully) only require parentheses where Perl itself requires them. All constructs in the following example are therefore ok to use: print gettext ("Hello World!\n"); print gettext "Hello World!\n"; print dgettext ($package => "Hello World!\n"); print dgettext $package, "Hello World!\n"; # The "fat comma" => turns the left-hand side argument into a # single-quoted string! print dgettext smellovision => "Hello World!\n"; # The following assignment only works with prototyped functions. # Otherwise, the functions will act as "greedy" list operators and # eat up all following arguments. my $anonymous_hash = { planet => gettext "earth", cakes => ngettext "one cake", "several cakes", $n, still => $works, }; # The same without fat comma: my $other_hash = { 'planet', gettext "earth", 'cakes', ngettext "one cake", "several cakes", $n, 'still', $works, }; # Parentheses are only significant for the first argument. print dngettext 'package', ("one cake", "several cakes", $n), $discarded; File: gettext.info, Node: Long Lines, Next: Perl Pitfalls, Prev: Parentheses, Up: Perl How To Grok with Long Lines ........................... The necessity of long messages can often lead to a cumbersome or unreadable coding style. Perl has several options that may prevent you from writing unreadable code, and `xgettext' does its best to do likewise. This is where the dot operator (the string concatenation operator) may come in handy: print gettext ("This is a very long" . " message that is still" . " readable, because" . " it is split into" . " multiple lines.\n"); Perl is smart enough to concatenate these constant string fragments into one long string at compile time, and so is `xgettext'. You will only find one long message in the resulting POT file. Note that the future Perl 6 will probably use the underscore (`_') as the string concatenation operator, and the dot (`.') for dereferencing. This new syntax is not yet supported by `xgettext'. If embedded newline characters are not an issue, or even desired, you may also insert newline characters inside quoted strings wherever you feel like it: print gettext ("<em>In HTML output embedded newlines are generally no problem, since adjacent whitespace is always rendered into a single space character.</em>"); You may also consider to use here documents: print gettext <<EOF; <em>In HTML output embedded newlines are generally no problem, since adjacent whitespace is always rendered into a single space character.</em> EOF Please do not forget, that the line breaks are real, i. e. they translate into newline characters that will consequently show up in the resulting POT file. File: gettext.info, Node: Perl Pitfalls, Prev: Long Lines, Up: Perl Bugs, Pitfalls, And Things That Do Not Work ........................................... The foregoing sections should have proven that `xgettext' is quite smart in extracting translatable strings from Perl sources. Yet, some more or less exotic constructs that could be expected to work, actually do not work. One of the more relevant limitations can be found in the implementation of variable interpolation inside quoted strings. Only simple hash lookups can be used there: print <<EOF; $gettext{"The dot operator" . " does not work" . "here!"} Likewise, you cannot @{[ gettext ("interpolate function calls") ]} inside quoted strings or quote-like expressions. EOF This is valid Perl code and will actually trigger invocations of the `gettext' function at runtime. Yet, the Perl parser in `xgettext' will fail to recognize the strings. A less obvious example can be found in the interpolation of regular expressions: s/<!--START_OF_WEEK-->/gettext ("Sunday")/e; The modifier `e' will cause the substitution to be interpreted as an evaluable statement. Consequently, at runtime the function `gettext()' is called, but again, the parser fails to extract the string "Sunday". Use a temporary variable as a simple workaround if you really happen to need this feature: my $sunday = gettext "Sunday"; s/<!--START_OF_WEEK-->/$sunday/; Hash slices would also be handy but are not recognized: my @weekdays = @gettext{'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'}; # Or even: @weekdays = @gettext{qw (Sunday Monday Tuesday Wednesday Thursday Friday Saturday) }; This is perfectly valid usage of the tied hash `%gettext' but the strings are not recognized and therefore will not be extracted. Another caveat of the current version is its rudimentary support for non-ASCII characters in identifiers. You may encounter serious problems if you use identifiers with characters outside the range of 'A'-'Z', 'a'-'z', '0'-'9' and the underscore '_'. Maybe some of these missing features will be implemented in future versions, but since you can always make do without them at minimal effort, these todos have very low priority. A nasty problem are brace format strings that already contain braces as part of the normal text, for example the usage strings typically encountered in programs: die "usage: $0 {OPTIONS} FILENAME...\n"; If you want to internationalize this code with Perl brace format strings, you will run into a problem: die __x ("usage: {program} {OPTIONS} FILENAME...\n", program => $0); Whereas `{program}' is a placeholder, `{OPTIONS}' is not and should probably be translated. Yet, there is no way to teach the Perl parser in `xgettext' to recognize the first one, and leave the other one alone. There are two possible work-arounds for this problem. If you are sure that your program will run under Perl 5.8.0 or newer (these Perl versions handle positional parameters in `printf()') or if you are sure that the translator will not have to reorder the arguments in her translation - for example if you have only one brace placeholder in your string, or if it describes a syntax, like in this one -, you can mark the string as `no-perl-brace-format' and use `printf()': # xgettext: no-perl-brace-format die sprintf ("usage: %s {OPTIONS} FILENAME...\n", $0); If you want to use the more portable Perl brace format, you will have to do put placeholders in place of the literal braces: die __x ("usage: {program} {[}OPTIONS{]} FILENAME...\n", program => $0, '[' => '{', ']' => '}'); Perl brace format strings know no escaping mechanism. No matter how this escaping mechanism looked like, it would either give the programmer a hard time, make translating Perl brace format strings heavy-going, or result in a performance penalty at runtime, when the format directives get executed. Most of the time you will happily get along with `printf()' for this special case. File: gettext.info, Node: PHP, Next: Pike, Prev: Perl, Up: List of Programming Languages PHP Hypertext Preprocessor -------------------------- RPMs mod_php4, mod_php4-core, phpdoc File extension `php', `php3', `php4' String syntax `"abc"', `'abc'' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext'; starting with PHP 4.2.0 also `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite -- Use or emulate GNU gettext use Extractor `xgettext' Formatting with positions `printf "%2\$d %1\$d"' Portability On platforms without gettext, the functions are not available. po-mode marking -- An example is available in the `examples' directory: `hello-php'. File: gettext.info, Node: Pike, Next: GCC-source, Prev: PHP, Up: List of Programming Languages Pike ---- RPMs roxen File extension `pike' String syntax `"abc"' gettext shorthand -- gettext/ngettext functions `gettext', `dgettext', `dcgettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale `setlocale' function Prerequisite `import Locale.Gettext;' Use or emulate GNU gettext use Extractor -- Formatting with positions -- Portability On platforms without gettext, the functions are not available. po-mode marking -- File: gettext.info, Node: GCC-source, Prev: Pike, Up: List of Programming Languages GNU Compiler Collection sources ------------------------------- RPMs gcc File extension `c', `h'. String syntax `"abc"' gettext shorthand `_("abc")' gettext/ngettext functions `gettext', `dgettext', `dcgettext', `ngettext', `dngettext', `dcngettext' textdomain `textdomain' function bindtextdomain `bindtextdomain' function setlocale Programmer must call `setlocale (LC_ALL, "")' Prerequisite `#include "intl.h"' Use or emulate GNU gettext Use Extractor `xgettext -k_' Formatting with positions -- Portability Uses autoconf macros po-mode marking yes File: gettext.info, Node: List of Data Formats, Prev: List of Programming Languages, Up: Programming Languages Internationalizable Data ======================== Here is a list of other data formats which can be internationalized using GNU gettext. * Menu: * POT:: POT - Portable Object Template * RST:: Resource String Table * Glade:: Glade - GNOME user interface description File: gettext.info, Node: POT, Next: RST, Prev: List of Data Formats, Up: List of Data Formats POT - Portable Object Template ------------------------------ RPMs gettext File extension `pot', `po' Extractor `xgettext' File: gettext.info, Node: RST, Next: Glade, Prev: POT, Up: List of Data Formats Resource String Table --------------------- RPMs fpk File extension `rst' Extractor `xgettext', `rstconv' File: gettext.info, Node: Glade, Prev: RST, Up: List of Data Formats Glade - GNOME user interface description ---------------------------------------- RPMs glade, libglade, glade2, libglade2, intltool File extension `glade', `glade2' Extractor `xgettext', `libglade-xgettext', `xml-i18n-extract', `intltool-extract' File: gettext.info, Node: Conclusion, Next: Language Codes, Prev: Programming Languages, Up: Top Concluding Remarks ****************** We would like to conclude this GNU `gettext' manual by presenting an history of the Translation Project so far. We finally give a few pointers for those who want to do further research or readings about Native Language Support matters. * Menu: * History:: History of GNU `gettext' * References:: Related Readings File: gettext.info, Node: History, Next: References, Prev: Conclusion, Up: Conclusion History of GNU `gettext' ======================== Internationalization concerns and algorithms have been informally and casually discussed for years in GNU, sometimes around GNU `libc', maybe around the incoming `Hurd', or otherwise (nobody clearly remembers). And even then, when the work started for real, this was somewhat independently of these previous discussions. This all began in July 1994, when Patrick D'Cruze had the idea and initiative of internationalizing version 3.9.2 of GNU `fileutils'. He then asked Jim Meyering, the maintainer, how to get those changes folded into an official release. That first draft was full of `#ifdef's and somewhat disconcerting, and Jim wanted to find nicer ways. Patrick and Jim shared some tries and experimentations in this area. Then, feeling that this might eventually have a deeper impact on GNU, Jim wanted to know what standards were, and contacted Richard Stallman, who very quickly and verbally described an overall design for what was meant to become `glocale', at that time. Jim implemented `glocale' and got a lot of exhausting feedback from Patrick and Richard, of course, but also from Mitchum DSouza (who wrote a `catgets'-like package), Roland McGrath, maybe David MacKenzie, Franc,ois Pinard, and Paul Eggert, all pushing and pulling in various directions, not always compatible, to the extent that after a couple of test releases, `glocale' was torn apart. In particular, Paul Eggert - always keeping an eye on developments in Solaris - advocated the use of the `gettext' API over `glocale''s `catgets'-based API. While Jim took some distance and time and became dad for a second time, Roland wanted to get GNU `libc' internationalized, and got Ulrich Drepper involved in that project. Instead of starting from `glocale', Ulrich rewrote something from scratch, but more conformant to the set of guidelines who emerged out of the `glocale' effort. Then, Ulrich got people from the previous forum to involve themselves into this new project, and the switch from `glocale' to what was first named `msgutils', renamed `nlsutils', and later `gettext', became officially accepted by Richard in May 1995 or so. Let's summarize by saying that Ulrich Drepper wrote GNU `gettext' in April 1995. The first official release of the package, including PO mode, occurred in July 1995, and was numbered 0.7. Other people contributed to the effort by providing a discussion forum around Ulrich, writing little pieces of code, or testing. These are quoted in the `THANKS' file which comes with the GNU `gettext' distribution. While this was being done, Franc,ois adapted half a dozen of GNU packages to `glocale' first, then later to `gettext', putting them in pretest, so providing along the way an effective user environment for fine tuning the evolving tools. He also took the responsibility of organizing and coordinating the Translation Project. After nearly a year of informal exchanges between people from many countries, translator teams started to exist in May 1995, through the creation and support by Patrick D'Cruze of twenty unmoderated mailing lists for that many native languages, and two moderated lists: one for reaching all teams at once, the other for reaching all willing maintainers of internationalized free software packages. Franc,ois also wrote PO mode in June 1995 with the collaboration of Greg McGary, as a kind of contribution to Ulrich's package. He also gave a hand with the GNU `gettext' Texinfo manual. In 1997, Ulrich Drepper released the GNU libc 2.0, which included the `gettext', `textdomain' and `bindtextdomain' functions. In 2000, Ulrich Drepper added plural form handling (the `ngettext' function) to GNU libc. Later, in 2001, he released GNU libc 2.2.x, which is the first free C library with full internationalization support. Ulrich being quite busy in his role of General Maintainer of GNU libc, he handed over the GNU `gettext' maintenance to Bruno Haible in 2000. Bruno added the plural form handling to the tools as well, added support for UTF-8 and CJK locales, and wrote a few new tools for manipulating PO files. File: gettext.info, Node: References, Prev: History, Up: Conclusion Related Readings ================ Eugene H. Dorr (`dorre@well.com') maintains an interesting bibliography on internationalization matters, called `Internationalization Reference List', which is available as: ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a Frequently Asked Questions (FAQ) list, entitled `Programming for Internationalisation'. This FAQ discusses writing programs which can handle different language conventions, character sets, etc.; and is applicable to all character set encodings, with particular emphasis on ISO 8859-1. It is regularly published in Usenet groups `comp.unix.questions', `comp.std.internat', `comp.software.international', `comp.lang.c', `comp.windows.x', `comp.std.c', `comp.answers' and `news.answers'. The home location of this document is: ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took over the responsibility of maintaining it. It may be found as: ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/... ...locale-tutorial-0.8.txt.gz This site is mirrored in: ftp://ftp.ibp.fr/pub/linux/sunsite/ A French version of the same tutorial should be findable at: ftp://ftp.ibp.fr/pub/linux/french/docs/ together with French translations of many Linux-related documents. File: gettext.info, Node: Language Codes, Next: Country Codes, Prev: Conclusion, Up: Top Language Codes ************** The ISO 639 standard defines two character codes for many languages. All abbreviations for languages used in the Translation Project should come from this standard. `aa' Afar. `ab' Abkhazian. `ae' Avestan. `af' Afrikaans. `am' Amharic. `an' Aragonese. `ar' Arabic. `as' Assamese. `ay' Aymara. `az' Azerbaijani. `ba' Bashkir. `be' Byelorussian; Belarusian. `bg' Bulgarian. `bh' Bihari. `bi' Bislama. `bn' Bengali; Bangla. `bo' Tibetan. `br' Breton. `bs' Bosnian. `ca' Catalan. `ce' Chechen. `ch' Chamorro. `co' Corsican. `cs' Czech. `cu' Church Slavic. `cv' Chuvash. `cy' Welsh. `da' Danish. `de' German. `dz' Dzongkha; Bhutani. `el' Greek. `en' English. `eo' Esperanto. `es' Spanish. `et' Estonian. `eu' Basque. `fa' Persian. `fi' Finnish. `fj' Fijian; Fiji. `fo' Faroese. `fr' French. `fy' Frisian. `ga' Irish. `gd' Scots; Gaelic. `gl' Gallegan; Galician. `gn' Guarani. `gu' Gujarati. `gv' Manx. `ha' Hausa (?). `he' Hebrew (formerly iw). `hi' Hindi. `ho' Hiri Motu. `hr' Croatian. `ht' Haitian; Haitian Creole. `hu' Hungarian. `hy' Armenian. `hz' Herero. `ia' Interlingua. `id' Indonesian (formerly in). `ie' Interlingue. `ii' Sichuan Yi. `ik' Inupiak. `io' Ido. `is' Icelandic. `it' Italian. `iu' Inuktitut. `ja' Japanese. `jv' Javanese. `ka' Georgian. `ki' Kikuyu. `kj' Kuanyama. `kk' Kazakh. `kl' Kalaallisut; Greenlandic. `km' Khmer; Cambodian. `kn' Kannada. `ko' Korean. `ks' Kashmiri. `ku' Kurdish. `kv' Komi. `kw' Cornish. `ky' Kirghiz. `la' Latin. `lb' Letzeburgesch. `li' Limburgish; Limburger; Limburgan. `ln' Lingala. `lo' Lao; Laotian. `lt' Lithuanian. `lv' Latvian; Lettish. `mg' Malagasy. `mh' Marshall. `mi' Maori. `mk' Macedonian. `ml' Malayalam. `mn' Mongolian. `mo' Moldavian. `mr' Marathi. `ms' Malay. `mt' Maltese. `my' Burmese. `na' Nauru. `nb' Norwegian Bokmaal. `nd' Ndebele, North. `ne' Nepali. `ng' Ndonga. `nl' Dutch. `nn' Norwegian Nynorsk. `no' Norwegian. `nr' Ndebele, South. `nv' Navajo. `ny' Chichewa; Nyanja. `oc' Occitan; Provenc,al. `om' (Afan) Oromo. `or' Oriya. `os' Ossetian; Ossetic. `pa' Panjabi; Punjabi. `pi' Pali. `pl' Polish. `ps' Pashto, Pushto. `pt' Portuguese. `qu' Quechua. `rm' Rhaeto-Romance. `rn' Rundi; Kirundi. `ro' Romanian. `ru' Russian. `rw' Kinyarwanda. `sa' Sanskrit. `sc' Sardinian. `sd' Sindhi. `se' Northern Sami. `sg' Sango; Sangro. `si' Sinhalese. `sk' Slovak. `sl' Slovenian. `sm' Samoan. `sn' Shona. `so' Somali. `sq' Albanian. `sr' Serbian. `ss' Swati; Siswati. `st' Sesotho; Sotho, Southern. `su' Sundanese. `sv' Swedish. `sw' Swahili. `ta' Tamil. `te' Telugu. `tg' Tajik. `th' Thai. `ti' Tigrinya. `tk' Turkmen. `tl' Tagalog. `tn' Tswana; Setswana. `to' Tonga (?). `tr' Turkish. `ts' Tsonga. `tt' Tatar. `tw' Twi. `ty' Tahitian. `ug' Uighur. `uk' Ukrainian. `ur' Urdu. `uz' Uzbek. `vi' Vietnamese. `vo' Volapu"k; Volapuk. `wa' Walloon. `wo' Wolof. `xh' Xhosa. `yi' Yiddish (formerly ji). `yo' Yoruba. `za' Zhuang. `zh' Chinese. `zu' Zulu. File: gettext.info, Node: Country Codes, Next: Program Index, Prev: Language Codes, Up: Top Country Codes ************* The ISO 3166 standard defines two character codes for many countries and territories. All abbreviations for countries used in the Translation Project should come from this standard. `AD' Andorra. `AE' United Arab Emirates. `AF' Afghanistan. `AG' Antigua and Barbuda. `AI' Anguilla. `AL' Albania. `AM' Armenia. `AN' Netherlands Antilles. `AO' Angola. `AQ' Antarctica. `AR' Argentina. `AS' Samoa (American). `AT' Austria. `AU' Australia. `AW' Aruba. `AZ' Azerbaijan. `BA' Bosnia and Herzegovina. `BB' Barbados. `BD' Bangladesh. `BE' Belgium. `BF' Burkina Faso. `BG' Bulgaria. `BH' Bahrain. `BI' Burundi. `BJ' Benin. `BM' Bermuda. `BN' Brunei. `BO' Bolivia. `BR' Brazil. `BS' Bahamas. `BT' Bhutan. `BV' Bouvet Island. `BW' Botswana. `BY' Belarus. `BZ' Belize. `CA' Canada. `CC' Cocos (Keeling) Islands. `CD' Congo (Dem. Rep.). `CF' Central African Rep.. `CG' Congo (Rep.). `CH' Switzerland. `CI' Co^te d'Ivoire. `CK' Cook Islands. `CL' Chile. `CM' Cameroon. `CN' China. `CO' Colombia. `CR' Costa Rica. `CS' Serbia and Montenegro. `CU' Cuba. `CV' Cape Verde. `CX' Christmas Island. `CY' Cyprus. `CZ' Czech Republic. `DE' Germany. `DJ' Djibouti. `DK' Denmark. `DM' Dominica. `DO' Dominican Republic. `DZ' Algeria. `EC' Ecuador. `EE' Estonia. `EG' Egypt. `EH' Western Sahara. `ER' Eritrea. `ES' Spain. `ET' Ethiopia. `FI' Finland. `FJ' Fiji. `FK' Falkland Islands. `FM' Micronesia. `FO' Faeroe Islands. `FR' France. `GA' Gabon. `GB' Britain (UK). `GD' Grenada. `GE' Georgia. `GF' French Guiana. `GH' Ghana. `GI' Gibraltar. `GL' Greenland. `GM' Gambia. `GN' Guinea. `GP' Guadeloupe. `GQ' Equatorial Guinea. `GR' Greece. `GS' South Georgia and the South Sandwich Islands. `GT' Guatemala. `GU' Guam. `GW' Guinea-Bissau. `GY' Guyana. `HK' Hong Kong. `HM' Heard Island and McDonald Islands. `HN' Honduras. `HR' Croatia. `HT' Haiti. `HU' Hungary. `ID' Indonesia. `IE' Ireland. `IL' Israel. `IN' India. `IO' British Indian Ocean Territory. `IQ' Iraq. `IR' Iran. `IS' Iceland. `IT' Italy. `JM' Jamaica. `JO' Jordan. `JP' Japan. `KE' Kenya. `KG' Kyrgyzstan. `KH' Cambodia. `KI' Kiribati. `KM' Comoros. `KN' St Kitts and Nevis. `KP' Korea (North). `KR' Korea (South). `KW' Kuwait. `KY' Cayman Islands. `KZ' Kazakhstan. `LA' Laos. `LB' Lebanon. `LC' St Lucia. `LI' Liechtenstein. `LK' Sri Lanka. `LR' Liberia. `LS' Lesotho. `LT' Lithuania. `LU' Luxembourg. `LV' Latvia. `LY' Libya. `MA' Morocco. `MC' Monaco. `MD' Moldova. `MG' Madagascar. `MH' Marshall Islands. `MK' Macedonia. `ML' Mali. `MM' Myanmar (Burma). `MN' Mongolia. `MO' Macao. `MP' Northern Mariana Islands. `MQ' Martinique. `MR' Mauritania. `MS' Montserrat. `MT' Malta. `MU' Mauritius. `MV' Maldives. `MW' Malawi. `MX' Mexico. `MY' Malaysia. `MZ' Mozambique. `NA' Namibia. `NC' New Caledonia. `NE' Niger. `NF' Norfolk Island. `NG' Nigeria. `NI' Nicaragua. `NL' Netherlands. `NO' Norway. `NP' Nepal. `NR' Nauru. `NU' Niue. `NZ' New Zealand. `OM' Oman. `PA' Panama. `PE' Peru. `PF' French Polynesia. `PG' Papua New Guinea. `PH' Philippines. `PK' Pakistan. `PL' Poland. `PM' St Pierre and Miquelon. `PN' Pitcairn. `PR' Puerto Rico. `PS' Palestine. `PT' Portugal. `PW' Palau. `PY' Paraguay. `QA' Qatar. `RE' Reunion. `RO' Romania. `RU' Russia. `RW' Rwanda. `SA' Saudi Arabia. `SB' Solomon Islands. `SC' Seychelles. `SD' Sudan. `SE' Sweden. `SG' Singapore. `SH' St Helena. `SI' Slovenia. `SJ' Svalbard and Jan Mayen. `SK' Slovakia. `SL' Sierra Leone. `SM' San Marino. `SN' Senegal. `SO' Somalia. `SR' Suriname. `ST' Sao Tome and Principe. `SV' El Salvador. `SY' Syria. `SZ' Swaziland. `TC' Turks and Caicos Islands. `TD' Chad. `TF' French Southern and Antarctic Lands. `TG' Togo. `TH' Thailand. `TJ' Tajikistan. `TK' Tokelau. `TL' Timor-Leste. `TM' Turkmenistan. `TN' Tunisia. `TO' Tonga. `TR' Turkey. `TT' Trinidad and Tobago. `TV' Tuvalu. `TW' Taiwan. `TZ' Tanzania. `UA' Ukraine. `UG' Uganda. `UM' US minor outlying islands. `US' United States. `UY' Uruguay. `UZ' Uzbekistan. `VA' Vatican City. `VC' St Vincent. `VE' Venezuela. `VG' Virgin Islands (UK). `VI' Virgin Islands (US). `VN' Vietnam. `VU' Vanuatu. `WF' Wallis and Futuna. `WS' Samoa (Western). `YE' Yemen. `YT' Mayotte. `ZA' South Africa. `ZM' Zambia. `ZW' Zimbabwe. File: gettext.info, Node: Program Index, Next: Option Index, Prev: Country Codes, Up: Top Program Index ************* * Menu: * autopoint: autopoint Invocation. * envsubst: envsubst Invocation. * gettext <1>: gettext Invocation. * gettext: sh. * gettextize: gettextize Invocation. * msgattrib: msgattrib Invocation. * msgcat: msgcat Invocation. * msgcmp: msgcmp Invocation. * msgcomm: msgcomm Invocation. * msgconv: msgconv Invocation. * msgen: msgen Invocation. * msgexec: msgexec Invocation. * msgfilter: msgfilter Invocation. * msgfmt: msgfmt Invocation. * msggrep: msggrep Invocation. * msginit: msginit Invocation. * msgmerge: msgmerge Invocation. * msgunfmt: msgunfmt Invocation. * msguniq: msguniq Invocation. * ngettext <1>: ngettext Invocation. * ngettext: sh. * xgettext: xgettext Invocation. File: gettext.info, Node: Option Index, Next: Variable Index, Prev: Program Index, Up: Top Option Index ************ * Menu: * --add-comments, xgettext option: xgettext Invocation. * --add-location, msgattrib option: msgattrib Invocation. * --add-location, msgcat option: msgcat Invocation. * --add-location, msgcomm option: msgcomm Invocation. * --add-location, msgconv option: msgconv Invocation. * --add-location, msgen option: msgen Invocation. * --add-location, msgfilter option: msgfilter Invocation. * --add-location, msggrep option: msggrep Invocation. * --add-location, msgmerge option: msgmerge Invocation. * --add-location, msguniq option: msguniq Invocation. * --add-location, xgettext option: xgettext Invocation. * --alignment, msgfmt option: msgfmt Invocation. * --backup, msgmerge option: msgmerge Invocation. * --c++, xgettext option: xgettext Invocation. * --check, msgfmt option: msgfmt Invocation. * --check-accelerators, msgfmt option: msgfmt Invocation. * --check-compatibility, msgfmt option: msgfmt Invocation. * --check-domain, msgfmt option: msgfmt Invocation. * --check-format, msgfmt option: msgfmt Invocation. * --check-header, msgfmt option: msgfmt Invocation. * --clear-fuzzy, msgattrib option: msgattrib Invocation. * --clear-obsolete, msgattrib option: msgattrib Invocation. * --comment, msggrep option: msggrep Invocation. * --compendium, msgmerge option: msgmerge Invocation. * --copy, gettextize option: gettextize Invocation. * --copyright-holder, xgettext option: xgettext Invocation. * --debug, xgettext option: xgettext Invocation. * --default-domain, xgettext option: xgettext Invocation. * --directory, msgattrib option: msgattrib Invocation. * --directory, msgcat option: msgcat Invocation. * --directory, msgcmp option: msgcmp Invocation. * --directory, msgcomm option: msgcomm Invocation. * --directory, msgconv option: msgconv Invocation. * --directory, msgen option: msgen Invocation. * --directory, msgexec option: msgexec Invocation. * --directory, msgfilter option: msgfilter Invocation. * --directory, msgfmt option: msgfmt Invocation. * --directory, msggrep option: msggrep Invocation. * --directory, msgmerge option: msgmerge Invocation. * --directory, msguniq option: msguniq Invocation. * --directory, xgettext option: xgettext Invocation. * --domain, gettext option: gettext Invocation. * --domain, msggrep option: msggrep Invocation. * --domain, ngettext option: ngettext Invocation. * --dry-run, autopoint option: autopoint Invocation. * --dry-run, gettextize option: gettextize Invocation. * --exclude-file, xgettext option: xgettext Invocation. * --expression, msgfilter option: msgfilter Invocation. * --extended-regexp, msggrep option: msggrep Invocation. * --extract-all, xgettext option: xgettext Invocation. * --file, msgfilter option: msgfilter Invocation. * --file, msggrep option: msggrep Invocation. * --files-from, msgcat option: msgcat Invocation. * --files-from, msgcomm option: msgcomm Invocation. * --files-from, xgettext option: xgettext Invocation. * --fixed-strings, msggrep option: msggrep Invocation. * --flag, xgettext option: xgettext Invocation. * --force, autopoint option: autopoint Invocation. * --force, gettextize option: gettextize Invocation. * --force-po, msgattrib option: msgattrib Invocation. * --force-po, msgcat option: msgcat Invocation. * --force-po, msgcomm option: msgcomm Invocation. * --force-po, msgconv option: msgconv Invocation. * --force-po, msgen option: msgen Invocation. * --force-po, msgfilter option: msgfilter Invocation. * --force-po, msggrep option: msggrep Invocation. * --force-po, msgmerge option: msgmerge Invocation. * --force-po, msgunfmt option: msgunfmt Invocation. * --force-po, msguniq option: msguniq Invocation. * --force-po, xgettext option: xgettext Invocation. * --foreign-user, xgettext option: xgettext Invocation. * --from-code, xgettext option: xgettext Invocation. * --fuzzy, msgattrib option: msgattrib Invocation. * --help, autopoint option: autopoint Invocation. * --help, envsubst option: envsubst Invocation. * --help, gettext option: gettext Invocation. * --help, gettextize option: gettextize Invocation. * --help, msgattrib option: msgattrib Invocation. * --help, msgcat option: msgcat Invocation. * --help, msgcmp option: msgcmp Invocation. * --help, msgcomm option: msgcomm Invocation. * --help, msgconv option: msgconv Invocation. * --help, msgen option: msgen Invocation. * --help, msgexec option: msgexec Invocation. * --help, msgfilter option: msgfilter Invocation. * --help, msgfmt option: msgfmt Invocation. * --help, msggrep option: msggrep Invocation. * --help, msginit option: msginit Invocation. * --help, msgmerge option: msgmerge Invocation. * --help, msgunfmt option: msgunfmt Invocation. * --help, msguniq option: msguniq Invocation. * --help, ngettext option: ngettext Invocation. * --help, xgettext option: xgettext Invocation. * --ignore-case, msggrep option: msggrep Invocation. * --ignore-file, msgattrib option: msgattrib Invocation. * --indent, msgattrib option: msgattrib Invocation. * --indent, msgcat option: msgcat Invocation. * --indent, msgcomm option: msgcomm Invocation. * --indent, msgconv option: msgconv Invocation. * --indent, msgen option: msgen Invocation. * --indent, msgfilter option: msgfilter Invocation. * --indent, msggrep option: msggrep Invocation. * --indent, msgmerge option: msgmerge Invocation. * --indent, msgunfmt option: msgunfmt Invocation. * --indent, msguniq option: msguniq Invocation. * --indent, xgettext option: xgettext Invocation. * --input, msgexec option: msgexec Invocation. * --input, msgfilter option: msgfilter Invocation. * --input, msginit option: msginit Invocation. * --intl, gettextize option: gettextize Invocation. * --java, msgfmt option: msgfmt Invocation. * --java, msgunfmt option: msgunfmt Invocation. * --java2, msgfmt option: msgfmt Invocation. * --join-existing, xgettext option: xgettext Invocation. * --keep-header, msgfilter option: msgfilter Invocation. * --keyword, xgettext option: xgettext Invocation. * --language, xgettext option: xgettext Invocation. * --less-than, msgcat option: msgcat Invocation. * --less-than, msgcomm option: msgcomm Invocation. * --locale, msgfmt option: msgfmt Invocation. * --locale, msginit option: msginit Invocation. * --locale, msgunfmt option: msgunfmt Invocation. * --location, msggrep option: msggrep Invocation. * --more-than, msgcat option: msgcat Invocation. * --more-than, msgcomm option: msgcomm Invocation. * --msgid, msggrep option: msggrep Invocation. * --msgid-bugs-address, xgettext option: xgettext Invocation. * --msgstr, msggrep option: msggrep Invocation. * --msgstr-prefix, xgettext option: xgettext Invocation. * --msgstr-suffix, xgettext option: xgettext Invocation. * --multi-domain, msgcmp option: msgcmp Invocation. * --multi-domain, msgmerge option: msgmerge Invocation. * --no-changelog, gettextize option: gettextize Invocation. * --no-fuzzy, msgattrib option: msgattrib Invocation. * --no-fuzzy-matching, msgmerge option: msgmerge Invocation. * --no-hash, msgfmt option: msgfmt Invocation. * --no-location, msgattrib option: msgattrib Invocation. * --no-location, msgcat option: msgcat Invocation. * --no-location, msgcomm option: msgcomm Invocation. * --no-location, msgconv option: msgconv Invocation. * --no-location, msgen option: msgen Invocation. * --no-location, msgfilter option: msgfilter Invocation. * --no-location, msggrep option: msggrep Invocation. * --no-location, msgmerge option: msgmerge Invocation. * --no-location, msguniq option: msguniq Invocation. * --no-location, xgettext option: xgettext Invocation. * --no-obsolete, msgattrib option: msgattrib Invocation. * --no-translator, msginit option: msginit Invocation. * --no-wrap, msgattrib option: msgattrib Invocation. * --no-wrap, msgcat option: msgcat Invocation. * --no-wrap, msgcomm option: msgcomm Invocation. * --no-wrap, msgconv option: msgconv Invocation. * --no-wrap, msgen option: msgen Invocation. * --no-wrap, msgfilter option: msgfilter Invocation. * --no-wrap, msggrep option: msggrep Invocation. * --no-wrap, msginit option: msginit Invocation. * --no-wrap, msgmerge option: msgmerge Invocation. * --no-wrap, msgunfmt option: msgunfmt Invocation. * --no-wrap, msguniq option: msguniq Invocation. * --no-wrap, xgettext option: xgettext Invocation. * --obsolete, msgattrib option: msgattrib Invocation. * --omit-header, msgcomm option: msgcomm Invocation. * --omit-header, xgettext option: xgettext Invocation. * --only-file, msgattrib option: msgattrib Invocation. * --only-fuzzy, msgattrib option: msgattrib Invocation. * --only-obsolete, msgattrib option: msgattrib Invocation. * --output, xgettext option: xgettext Invocation. * --output-dir, xgettext option: xgettext Invocation. * --output-file, msgattrib option: msgattrib Invocation. * --output-file, msgcat option: msgcat Invocation. * --output-file, msgcomm option: msgcomm Invocation. * --output-file, msgconv option: msgconv Invocation. * --output-file, msgen option: msgen Invocation. * --output-file, msgfilter option: msgfilter Invocation. * --output-file, msgfmt option: msgfmt Invocation. * --output-file, msggrep option: msggrep Invocation. * --output-file, msginit option: msginit Invocation. * --output-file, msgmerge option: msgmerge Invocation. * --output-file, msgunfmt option: msgunfmt Invocation. * --output-file, msguniq option: msguniq Invocation. * --properties-input, msgattrib option: msgattrib Invocation. * --properties-input, msgcat option: msgcat Invocation. * --properties-input, msgcmp option: msgcmp Invocation. * --properties-input, msgcomm option: msgcomm Invocation. * --properties-input, msgconv option: msgconv Invocation. * --properties-input, msgen option: msgen Invocation. * --properties-input, msgexec option: msgexec Invocation. * --properties-input, msgfilter option: msgfilter Invocation. * --properties-input, msgfmt option: msgfmt Invocation. * --properties-input, msggrep option: msggrep Invocation. * --properties-input, msginit option: msginit Invocation. * --properties-input, msgmerge option: msgmerge Invocation. * --properties-input, msguniq option: msguniq Invocation. * --properties-output, msgattrib option: msgattrib Invocation. * --properties-output, msgcat option: msgcat Invocation. * --properties-output, msgcomm option: msgcomm Invocation. * --properties-output, msgconv option: msgconv Invocation. * --properties-output, msgen option: msgen Invocation. * --properties-output, msgfilter option: msgfilter Invocation. * --properties-output, msggrep option: msggrep Invocation. * --properties-output, msginit option: msginit Invocation. * --properties-output, msgmerge option: msgmerge Invocation. * --properties-output, msgunfmt option: msgunfmt Invocation. * --properties-output, msguniq option: msguniq Invocation. * --properties-output, xgettext option: xgettext Invocation. * --qt, msgfmt option: msgfmt Invocation. * --qt, xgettext option: xgettext Invocation. * --quiet, msgfilter option: msgfilter Invocation. * --quiet, msgmerge option: msgmerge Invocation. * --regexp=, msggrep option: msggrep Invocation. * --repeated, msguniq option: msguniq Invocation. * --resource, msgfmt option: msgfmt Invocation. * --resource, msgunfmt option: msgunfmt Invocation. * --set-fuzzy, msgattrib option: msgattrib Invocation. * --set-obsolete, msgattrib option: msgattrib Invocation. * --silent, msgfilter option: msgfilter Invocation. * --silent, msgmerge option: msgmerge Invocation. * --sort-by-file, msgattrib option: msgattrib Invocation. * --sort-by-file, msgcat option: msgcat Invocation. * --sort-by-file, msgcomm option: msgcomm Invocation. * --sort-by-file, msgconv option: msgconv Invocation. * --sort-by-file, msgen option: msgen Invocation. * --sort-by-file, msgfilter option: msgfilter Invocation. * --sort-by-file, msggrep option: msggrep Invocation. * --sort-by-file, msgmerge option: msgmerge Invocation. * --sort-by-file, msguniq option: msguniq Invocation. * --sort-by-file, xgettext option: xgettext Invocation. * --sort-output, msgattrib option: msgattrib Invocation. * --sort-output, msgcat option: msgcat Invocation. * --sort-output, msgcomm option: msgcomm Invocation. * --sort-output, msgconv option: msgconv Invocation. * --sort-output, msgen option: msgen Invocation. * --sort-output, msgfilter option: msgfilter Invocation. * --sort-output, msggrep option: msggrep Invocation. * --sort-output, msgmerge option: msgmerge Invocation. * --sort-output, msgunfmt option: msgunfmt Invocation. * --sort-output, msguniq option: msguniq Invocation. * --sort-output, xgettext option: xgettext Invocation. * --statistics, msgfmt option: msgfmt Invocation. * --strict, msgattrib option: msgattrib Invocation. * --strict, msgcat option: msgcat Invocation. * --strict, msgcomm option: msgcomm Invocation. * --strict, msgconv option: msgconv Invocation. * --strict, msgen option: msgen Invocation. * --strict, msgfilter option: msgfilter Invocation. * --strict, msgfmt option: msgfmt Invocation. * --strict, msggrep option: msggrep Invocation. * --strict, msgmerge option: msgmerge Invocation. * --strict, msgunfmt option: msgunfmt Invocation. * --strict, msguniq option: msguniq Invocation. * --strict, xgettext option: xgettext Invocation. * --stringtable-input, msgattrib option: msgattrib Invocation. * --stringtable-input, msgcat option: msgcat Invocation. * --stringtable-input, msgcmp option: msgcmp Invocation. * --stringtable-input, msgcomm option: msgcomm Invocation. * --stringtable-input, msgen option: msgen Invocation. * --stringtable-input, msgexec option: msgexec Invocation. * --stringtable-input, msgfilter option: msgfilter Invocation. * --stringtable-input, msgfmt option: msgfmt Invocation. * --stringtable-input, msggrep option: msggrep Invocation. * --stringtable-input, msginit option: msginit Invocation. * --stringtable-input, msgmerge option: msgmerge Invocation. * --stringtable-input, msgonv option: msgconv Invocation. * --stringtable-input, msguniq option: msguniq Invocation. * --stringtable-output, msgattrib option: msgattrib Invocation. * --stringtable-output, msgcat option: msgcat Invocation. * --stringtable-output, msgcomm option: msgcomm Invocation. * --stringtable-output, msgconv option: msgconv Invocation. * --stringtable-output, msgen option: msgen Invocation. * --stringtable-output, msgfilter option: msgfilter Invocation. * --stringtable-output, msggrep option: msggrep Invocation. * --stringtable-output, msginit option: msginit Invocation. * --stringtable-output, msgmerge option: msgmerge Invocation. * --stringtable-output, msgunfmt option: msgunfmt Invocation. * --stringtable-output, msguniq option: msguniq Invocation. * --stringtable-output, xgettext option: xgettext Invocation. * --suffix, msgmerge option: msgmerge Invocation. * --tcl, msgfmt option: msgfmt Invocation. * --tcl, msgunfmt option: msgunfmt Invocation. * --to-code, msgcat option: msgcat Invocation. * --to-code, msgconv option: msgconv Invocation. * --to-code, msguniq option: msguniq Invocation. * --translated, msgattrib option: msgattrib Invocation. * --trigraphs, xgettext option: xgettext Invocation. * --unique, msgcat option: msgcat Invocation. * --unique, msgcomm option: msgcomm Invocation. * --unique, msguniq option: msguniq Invocation. * --untranslated, msgattrib option: msgattrib Invocation. * --update, msgmerge option: msgmerge Invocation. * --use-first, msgcat option: msgcat Invocation. * --use-first, msguniq option: msguniq Invocation. * --use-fuzzy, msgfmt option: msgfmt Invocation. * --variables, envsubst option: envsubst Invocation. * --verbose, msgfmt option: msgfmt Invocation. * --verbose, msgmerge option: msgmerge Invocation. * --verbose, msgunfmt option: msgunfmt Invocation. * --version, autopoint option: autopoint Invocation. * --version, envsubst option: envsubst Invocation. * --version, gettext option: gettext Invocation. * --version, gettextize option: gettextize Invocation. * --version, msgattrib option: msgattrib Invocation. * --version, msgcat option: msgcat Invocation. * --version, msgcmp option: msgcmp Invocation. * --version, msgcomm option: msgcomm Invocation. * --version, msgconv option: msgconv Invocation. * --version, msgen option: msgen Invocation. * --version, msgexec option: msgexec Invocation. * --version, msgfilter option: msgfilter Invocation. * --version, msgfmt option: msgfmt Invocation. * --version, msggrep option: msggrep Invocation. * --version, msginit option: msginit Invocation. * --version, msgmerge option: msgmerge Invocation. * --version, msgunfmt option: msgunfmt Invocation. * --version, msguniq option: msguniq Invocation. * --version, ngettext option: ngettext Invocation. * --version, xgettext option: xgettext Invocation. * --width, msgattrib option: msgattrib Invocation. * --width, msgcat option: msgcat Invocation. * --width, msgcomm option: msgcomm Invocation. * --width, msgconv option: msgconv Invocation. * --width, msgen option: msgen Invocation. * --width, msgfilter option: msgfilter Invocation. * --width, msggrep option: msggrep Invocation. * --width, msginit option: msginit Invocation. * --width, msgmerge option: msgmerge Invocation. * --width, msgunfmt option: msgunfmt Invocation. * --width, msguniq option: msguniq Invocation. * --width, xgettext option: xgettext Invocation. * -<, msgcat option: msgcat Invocation. * -<, msgcomm option: msgcomm Invocation. * ->, msgcat option: msgcat Invocation. * ->, msgcomm option: msgcomm Invocation. * -a, msgfmt option: msgfmt Invocation. * -a, xgettext option: xgettext Invocation. * -c, gettextize option: gettextize Invocation. * -C, msgfmt option: msgfmt Invocation. * -c, msgfmt option: msgfmt Invocation. * -C, msggrep option: msggrep Invocation. * -C, msgmerge option: msgmerge Invocation. * -c, xgettext option: xgettext Invocation. * -C, xgettext option: xgettext Invocation. * -d, autopoint option: autopoint Invocation. * -d, gettext option: gettext Invocation. * -d, gettextize option: gettextize Invocation. * -D, msgattrib option: msgattrib Invocation. * -D, msgcat option: msgcat Invocation. * -D, msgcmp option: msgcmp Invocation. * -D, msgcomm option: msgcomm Invocation. * -D, msgconv option: msgconv Invocation. * -D, msgen option: msgen Invocation. * -D, msgexec option: msgexec Invocation. * -D, msgfilter option: msgfilter Invocation. * -d, msgfmt option: msgfmt Invocation. * -D, msgfmt option: msgfmt Invocation. * -D, msggrep option: msggrep Invocation. * -D, msgmerge option: msgmerge Invocation. * -d, msgunfmt option: msgunfmt Invocation. * -d, msguniq option: msguniq Invocation. * -D, msguniq option: msguniq Invocation. * -d, ngettext option: ngettext Invocation. * -d, xgettext option: xgettext Invocation. * -D, xgettext option: xgettext Invocation. * -E, gettext option: gettext Invocation. * -e, gettext option: gettext Invocation. * -e, msgfilter option: msgfilter Invocation. * -e, msggrep option: msggrep Invocation. * -E, msggrep option: msggrep Invocation. * -E, ngettext option: ngettext Invocation. * -e, ngettext option: ngettext Invocation. * -f, autopoint option: autopoint Invocation. * -f, gettextize option: gettextize Invocation. * -F, msgattrib option: msgattrib Invocation. * -F, msgcat option: msgcat Invocation. * -f, msgcat option: msgcat Invocation. * -F, msgcomm option: msgcomm Invocation. * -f, msgcomm option: msgcomm Invocation. * -F, msgconv option: msgconv Invocation. * -F, msgen option: msgen Invocation. * -F, msgfilter option: msgfilter Invocation. * -f, msgfilter option: msgfilter Invocation. * -f, msgfmt option: msgfmt Invocation. * -f, msggrep option: msggrep Invocation. * -F, msggrep option: msggrep Invocation. * -F, msgmerge option: msgmerge Invocation. * -F, msguniq option: msguniq Invocation. * -F, xgettext option: xgettext Invocation. * -f, xgettext option: xgettext Invocation. * -h, envsubst option: envsubst Invocation. * -h, gettext option: gettext Invocation. * -h, msgattrib option: msgattrib Invocation. * -h, msgcat option: msgcat Invocation. * -h, msgcmp option: msgcmp Invocation. * -h, msgcomm option: msgcomm Invocation. * -h, msgconv option: msgconv Invocation. * -h, msgen option: msgen Invocation. * -h, msgexec option: msgexec Invocation. * -h, msgfilter option: msgfilter Invocation. * -h, msgfmt option: msgfmt Invocation. * -h, msggrep option: msggrep Invocation. * -h, msginit option: msginit Invocation. * -h, msgmerge option: msgmerge Invocation. * -h, msgunfmt option: msgunfmt Invocation. * -h, msguniq option: msguniq Invocation. * -h, ngettext option: ngettext Invocation. * -h, xgettext option: xgettext Invocation. * -i, msgattrib option: msgattrib Invocation. * -i, msgcat option: msgcat Invocation. * -i, msgcomm option: msgcomm Invocation. * -i, msgconv option: msgconv Invocation. * -i, msgen option: msgen Invocation. * -i, msgexec option: msgexec Invocation. * -i, msgfilter option: msgfilter Invocation. * -i, msggrep option: msggrep Invocation. * -i, msginit option: msginit Invocation. * -i, msgmerge option: msgmerge Invocation. * -i, msgunfmt option: msgunfmt Invocation. * -i, msguniq option: msguniq Invocation. * -i, xgettext option: xgettext Invocation. * -j, msgfmt option: msgfmt Invocation. * -j, msgunfmt option: msgunfmt Invocation. * -j, xgettext option: xgettext Invocation. * -K, msggrep option: msggrep Invocation. * -k, xgettext option: xgettext Invocation. * -l, msgfmt option: msgfmt Invocation. * -l, msginit option: msginit Invocation. * -l, msgunfmt option: msgunfmt Invocation. * -L, xgettext option: xgettext Invocation. * -m, msgcmp option: msgcmp Invocation. * -M, msggrep option: msggrep Invocation. * -m, msgmerge option: msgmerge Invocation. * -M, xgettext option: xgettext Invocation. * -m, xgettext option: xgettext Invocation. * -n, gettext option: gettext Invocation. * -n, msgattrib option: msgattrib Invocation. * -n, msgcat option: msgcat Invocation. * -n, msgcomm option: msgcomm Invocation. * -n, msgfilter option: msgfilter Invocation. * -N, msggrep option: msggrep Invocation. * -N, msgmerge option: msgmerge Invocation. * -n, msguniq option: msguniq Invocation. * -n, xgettext option: xgettext Invocation. * -o, msgattrib option: msgattrib Invocation. * -o, msgcat option: msgcat Invocation. * -o, msgcomm option: msgcomm Invocation. * -o, msgconv option: msgconv Invocation. * -o, msgen option: msgen Invocation. * -o, msgfilter option: msgfilter Invocation. * -o, msgfmt option: msgfmt Invocation. * -o, msggrep option: msggrep Invocation. * -o, msginit option: msginit Invocation. * -o, msgmerge option: msgmerge Invocation. * -o, msgunfmt option: msgunfmt Invocation. * -o, msguniq option: msguniq Invocation. * -o, xgettext option: xgettext Invocation. * -p, msgattrib option: msgattrib Invocation. * -P, msgattrib option: msgattrib Invocation. * -p, msgcat option: msgcat Invocation. * -P, msgcat option: msgcat Invocation. * -P, msgcmp option: msgcmp Invocation. * -p, msgcomm option: msgcomm Invocation. * -P, msgcomm option: msgcomm Invocation. * -p, msgconv option: msgconv Invocation. * -P, msgconv option: msgconv Invocation. * -p, msgen option: msgen Invocation. * -P, msgen option: msgen Invocation. * -P, msgexec option: msgexec Invocation. * -p, msgfilter option: msgfilter Invocation. * -P, msgfilter option: msgfilter Invocation. * -P, msgfmt option: msgfmt Invocation. * -p, msggrep option: msggrep Invocation. * -P, msggrep option: msggrep Invocation. * -p, msginit option: msginit Invocation. * -P, msginit option: msginit Invocation. * -p, msgmerge option: msgmerge Invocation. * -P, msgmerge option: msgmerge Invocation. * -p, msgunfmt option: msgunfmt Invocation. * -p, msguniq option: msguniq Invocation. * -P, msguniq option: msguniq Invocation. * -p, xgettext option: xgettext Invocation. * -q, msgmerge option: msgmerge Invocation. * -r, msgfmt option: msgfmt Invocation. * -r, msgunfmt option: msgunfmt Invocation. * -s, msgattrib option: msgattrib Invocation. * -s, msgcat option: msgcat Invocation. * -s, msgcomm option: msgcomm Invocation. * -s, msgconv option: msgconv Invocation. * -s, msgen option: msgen Invocation. * -s, msgfilter option: msgfilter Invocation. * -s, msgmerge option: msgmerge Invocation. * -s, msgunfmt option: msgunfmt Invocation. * -s, msguniq option: msguniq Invocation. * -s, xgettext option: xgettext Invocation. * -t, msgcat option: msgcat Invocation. * -t, msgconv option: msgconv Invocation. * -T, msggrep option: msggrep Invocation. * -t, msguniq option: msguniq Invocation. * -T, xgettext option: xgettext Invocation. * -u, msgcat option: msgcat Invocation. * -u, msgcomm option: msgcomm Invocation. * -U, msgmerge option: msgmerge Invocation. * -u, msguniq option: msguniq Invocation. * -V, envsubst option: envsubst Invocation. * -v, envsubst option: envsubst Invocation. * -V, gettext option: gettext Invocation. * -V, msgattrib option: msgattrib Invocation. * -V, msgcat option: msgcat Invocation. * -V, msgcmp option: msgcmp Invocation. * -V, msgcomm option: msgcomm Invocation. * -V, msgconv option: msgconv Invocation. * -V, msgen option: msgen Invocation. * -V, msgexec option: msgexec Invocation. * -V, msgfilter option: msgfilter Invocation. * -v, msgfmt option: msgfmt Invocation. * -V, msgfmt option: msgfmt Invocation. * -V, msggrep option: msggrep Invocation. * -V, msginit option: msginit Invocation. * -v, msgmerge option: msgmerge Invocation. * -V, msgmerge option: msgmerge Invocation. * -v, msgunfmt option: msgunfmt Invocation. * -V, msgunfmt option: msgunfmt Invocation. * -V, msguniq option: msguniq Invocation. * -V, ngettext option: ngettext Invocation. * -V, xgettext option: xgettext Invocation. * -w, msgattrib option: msgattrib Invocation. * -w, msgcat option: msgcat Invocation. * -w, msgcomm option: msgcomm Invocation. * -w, msgconv option: msgconv Invocation. * -w, msgen option: msgen Invocation. * -w, msgfilter option: msgfilter Invocation. * -w, msggrep option: msggrep Invocation. * -w, msginit option: msginit Invocation. * -w, msgmerge option: msgmerge Invocation. * -w, msgunfmt option: msgunfmt Invocation. * -w, msguniq option: msguniq Invocation. * -w, xgettext option: xgettext Invocation. * -x, xgettext option: xgettext Invocation. File: gettext.info, Node: Variable Index, Next: PO Mode Index, Prev: Option Index, Up: Top Variable Index ************** * Menu: * GETTEXT_LOG_UNTRANSLATED, environment variable: Prioritizing messages. * LANG, environment variable <1>: gettext grok. * LANG, environment variable: End Users. * LANGUAGE, environment variable <1>: po/Makevars. * LANGUAGE, environment variable: gettext grok. * LC_ALL, environment variable: gettext grok. * LC_COLLATE, environment variable: gettext grok. * LC_CTYPE, environment variable: gettext grok. * LC_MESSAGES, environment variable: gettext grok. * LC_MONETARY, environment variable: gettext grok. * LC_NUMERIC, environment variable: gettext grok. * LC_TIME, environment variable: gettext grok. * LINGUAS, environment variable: Installers. * MSGEXEC_LOCATION, environment variable: msgexec Invocation. * MSGEXEC_MSGID, environment variable: msgexec Invocation. * TEXTDOMAIN, environment variable: sh. * TEXTDOMAINDIR, environment variable: sh. File: gettext.info, Node: PO Mode Index, Next: Autoconf Macro Index, Prev: Variable Index, Up: Top PO Mode Index ************* * Menu: * #, PO Mode command: Modifying Comments. * ,, PO Mode command: Marking. * ., PO Mode command: Entry Positioning. * .emacs customizations: Installation. * 0, PO Mode command: Main PO Commands. * <, PO Mode command: Entry Positioning. * =, PO Mode command: Main PO Commands. * >, PO Mode command: Entry Positioning. * ?, PO Mode command: Main PO Commands. * _, PO Mode command: Main PO Commands. * a, PO Mode command: Auxiliary. * A, PO Mode command: Auxiliary. * a, PO Mode command: Auxiliary. * auxiliary PO file: Auxiliary. * C-c C-a, PO Mode command <1>: Auxiliary. * C-c C-a, PO Mode command: Subedit. * C-c C-c, PO Mode command: Subedit. * C-c C-k, PO Mode command: Subedit. * C-j, PO Mode command: Modifying Translations. * commands: Main PO Commands. * comment out PO file entry: Obsolete Entries. * consulting program sources: C Sources Context. * consulting translations to other languages: Auxiliary. * current entry of a PO file: Entry Positioning. * cut and paste for translated strings: Modifying Translations. * DEL, PO Mode command <1>: Obsolete Entries. * DEL, PO Mode command: Fuzzy Entries. * editing comments: Modifying Comments. * editing multiple entries: Subedit. * editing translations: Modifying Translations. * etags, using for marking strings: Marking. * exiting PO subedit: Subedit. * find source fragment for a PO file entry: C Sources Context. * h, PO Mode command: Main PO Commands. * installing PO mode: Installation. * K, PO Mode command: Modifying Comments. * k, PO Mode command <1>: Modifying Translations. * k, PO Mode command: Untranslated Entries. * LFD, PO Mode command: Modifying Translations. * looking at the source to aid translation: C Sources Context. * m, PO Mode command: Entry Positioning. * M-,, PO Mode command: Marking. * M-., PO Mode command: Marking. * M-A, PO Mode command: Auxiliary. * M-S, PO Mode command: C Sources Context. * M-s, PO Mode command: C Sources Context. * M-S, PO Mode command: C Sources Context. * M-s, PO Mode command: C Sources Context. * marking strings for translation: Marking. * moving by fuzzy entries: Fuzzy Entries. * moving by obsolete entries: Obsolete Entries. * moving by translated entries: Translated Entries. * moving by untranslated entries: Untranslated Entries. * moving through a PO file: Entry Positioning. * n, PO Mode command: Entry Positioning. * next-error, stepping through PO file validation results: Main PO Commands. * normalize, PO Mode command: Auxiliary. * O, PO Mode command: Obsolete Entries. * o, PO Mode command: Obsolete Entries. * O, PO Mode command: Obsolete Entries. * o, PO Mode command: Obsolete Entries. * obsolete active entry: Obsolete Entries. * p, PO Mode command: Entry Positioning. * pending subedits: Subedit. * po-auto-edit-with-msgid, PO Mode variable: Modifying Translations. * po-auto-fuzzy-on-edit, PO Mode variable: Translated Entries. * po-auto-select-on-unfuzzy, PO Mode variable: Fuzzy Entries. * po-confirm-and-quit, PO Mode command: Main PO Commands. * po-consider-as-auxiliary, PO Mode command: Auxiliary. * po-consider-source-path, PO Mode command: C Sources Context. * po-current-entry, PO Mode command: Entry Positioning. * po-cycle-auxiliary, PO Mode command: Auxiliary. * po-cycle-source-reference, PO Mode command: C Sources Context. * po-edit-comment, PO Mode command: Modifying Comments. * po-edit-msgstr, PO Mode command: Modifying Translations. * po-exchange-location, PO Mode command: Entry Positioning. * po-fade-out-entry, PO Mode command <1>: Obsolete Entries. * po-fade-out-entry, PO Mode command: Fuzzy Entries. * po-first-entry, PO Mode command: Entry Positioning. * po-help, PO Mode command: Main PO Commands. * po-ignore-as-auxiliary, PO Mode command: Auxiliary. * po-ignore-source-path, PO Mode command: C Sources Context. * po-kill-comment, PO Mode command: Modifying Comments. * po-kill-msgstr, PO Mode command <1>: Modifying Translations. * po-kill-msgstr, PO Mode command: Untranslated Entries. * po-kill-ring-save-comment, PO Mode command: Modifying Comments. * po-kill-ring-save-msgstr, PO Mode command: Modifying Translations. * po-last-entry, PO Mode command: Entry Positioning. * po-mark-translatable, PO Mode command: Marking. * po-msgid-to-msgstr, PO Mode command: Modifying Translations. * po-next-entry, PO Mode command: Entry Positioning. * po-next-fuzzy-entry, PO Mode command: Fuzzy Entries. * po-next-obsolete-entry, PO Mode command: Obsolete Entries. * po-next-translated-entry, PO Mode command: Translated Entries. * po-next-untranslated-entry, PO Mode command: Untranslated Entries. * po-normalize, PO Mode command <1>: Normalizing. * po-normalize, PO Mode command: PO Files. * po-other-window, PO Mode command: Main PO Commands. * po-pop-location, PO Mode command: Entry Positioning. * po-previous-entry, PO Mode command: Entry Positioning. * po-previous-fuzzy-entry, PO Mode command: Fuzzy Entries. * po-previous-obsolete-entry, PO Mode command: Obsolete Entries. * po-previous-translated-entry, PO Mode command: Translated Entries. * po-previous-untransted-entry, PO Mode command: Untranslated Entries. * po-push-location, PO Mode command: Entry Positioning. * po-quit, PO Mode command: Main PO Commands. * po-select-auxiliary, PO Mode command: Auxiliary. * po-select-mark-and-mark, PO Mode command: Marking. * po-select-source-reference, PO Mode command: C Sources Context. * po-statistics, PO Mode command: Main PO Commands. * po-subedit-abort, PO Mode command: Subedit. * po-subedit-cycle-auxiliary, PO Mode command: Subedit. * po-subedit-exit, PO Mode command: Subedit. * po-subedit-mode-hook, PO Mode variable: Modifying Comments. * po-tags-search, PO Mode command: Marking. * po-undo, PO Mode command: Main PO Commands. * po-unfuzzy, PO Mode command: Fuzzy Entries. * po-validate, PO Mode command: Main PO Commands. * po-yank-comment, PO Mode command: Modifying Comments. * po-yank-msgstr, PO Mode command: Modifying Translations. * q, PO Mode command: Main PO Commands. * Q, PO Mode command: Main PO Commands. * q, PO Mode command: Main PO Commands. * Q, PO Mode command: Main PO Commands. * r, PO Mode command: Entry Positioning. * RET, PO Mode command: Modifying Translations. * S, PO Mode command: C Sources Context. * s, PO Mode command: C Sources Context. * S, PO Mode command: C Sources Context. * s, PO Mode command: C Sources Context. * starting a string translation: Modifying Translations. * string normalization in entries: Normalizing. * subedit minor mode: Subedit. * T, PO Mode command: Translated Entries. * t, PO Mode command: Translated Entries. * T, PO Mode command: Translated Entries. * t, PO Mode command: Translated Entries. * TAB, PO Mode command: Fuzzy Entries. * TAGS, and marking translatable strings: Marking. * U, PO Mode command: Untranslated Entries. * u, PO Mode command: Untranslated Entries. * U, PO Mode command: Untranslated Entries. * u, PO Mode command: Untranslated Entries. * use the source, Luke: C Sources Context. * using obsolete translations to make new entries: Modifying Translations. * using translation compendia: Compendium. * V, PO Mode command: Main PO Commands. * W, PO Mode command: Modifying Comments. * w, PO Mode command: Modifying Translations. * x, PO Mode command: Entry Positioning. * Y, PO Mode command: Modifying Comments. * y, PO Mode command: Modifying Translations. * Z, PO Mode command: Fuzzy Entries. * z, PO Mode command: Fuzzy Entries. * Z, PO Mode command: Fuzzy Entries. * z, PO Mode command: Fuzzy Entries. File: gettext.info, Node: Autoconf Macro Index, Next: Index, Prev: PO Mode Index, Up: Top Autoconf Macro Index ******************** * Menu: * AM_GNU_GETTEXT: AM_GNU_GETTEXT. * AM_GNU_GETTEXT_VERSION: AM_GNU_GETTEXT_VERSION. * AM_ICONV: AM_ICONV. * AM_PO_SUBDIRS: AM_PO_SUBDIRS. File: gettext.info, Node: Index, Prev: Autoconf Macro Index, Up: Top General Index ************* * Menu: * _, a macro to mark strings for translation: Mark Keywords. * _nl_msg_cat_cntr: gettext grok. * ABOUT-NLS file: Matrix. * acconfig.h file: acconfig. * accumulating translations: Creating Compendia. * aclocal.m4 file: aclocal. * adding keywords, xgettext: xgettext Invocation. * ambiguities: Preparing Strings. * apply a filter to translations: msgfilter Invocation. * apply command to all translations in a catalog: msgexec Invocation. * attribute manipulation: msgattrib Invocation. * attribute, fuzzy: Fuzzy Entries. * attributes of a PO file entry: Fuzzy Entries. * attributes, manipulating: Manipulating. * autoconf macros for gettext: autoconf macros. * autopoint program, usage: autopoint Invocation. * auxiliary PO file: Auxiliary. * available translations: Matrix. * awk: gawk. * awk-format flag: PO Files. * backup old file, and msgmerge program: msgmerge Invocation. * bash: bash. * bibliography: References. * big picture: Overview. * bind_textdomain_codeset: Charset conversion. * bug report address: Introduction. * C and C-like languages: C. * C trigraphs: xgettext Invocation. * c-format flag: PO Files. * c-format, and xgettext: c-format Flag. * catalog encoding and msgexec output: msgexec Invocation. * catclose, a catgets function: Interface to catgets. * catgets, a catgets function: Interface to catgets. * catgets, X/Open specification: catgets. * catopen, a catgets function: Interface to catgets. * character encoding: Aspects. * charset conversion at runtime: Charset conversion. * charset of PO files: Header Entry. * check format strings: msgfmt Invocation. * checking of translations: Manipulating. * clisp: Common Lisp. * clisp C sources: clisp C. * codeset: Aspects. * comments in PO files: PO Files. * Common Lisp: Common Lisp. * compare PO files: msgcmp Invocation. * comparison of interfaces: Comparison. * compatibility with X/Open msgfmt: msgfmt Invocation. * compendium: Compendium. * compendium, creating: Creating Compendia. * concatenate PO files: msgcat Invocation. * concatenating PO files into a compendium: Creating Compendia. * concatenation of strings: Preparing Strings. * config.h.in file: config.h.in. * convert binary message catalog into PO file: msgunfmt Invocation. * convert translations to a different encoding: msgconv Invocation. * converting a package to use gettext: Prerequisites. * country codes: Country Codes. * create new PO file: msginit Invocation. * creating a new PO file: Creating. * creating compendia: Creating Compendia. * currency symbols: Aspects. * date format: Aspects. * dcngettext: Plural forms. * debugging messages marked as format strings: xgettext Invocation. * dialect: Manipulating. * disabling NLS: lib/gettext.h. * dngettext: Plural forms. * dollar substitution: envsubst Invocation. * domain ambiguities: Ambiguities. * duplicate elimination: Manipulating. * duplicate removal: msguniq Invocation. * editing comments in PO files: Modifying Comments. * editing translations: Modifying Translations. * elisp-format flag: PO Files. * Emacs Lisp: Emacs Lisp. * encoding: Aspects. * encoding conversion: Manipulating. * encoding conversion at runtime: Charset conversion. * encoding for your language: Header Entry. * encoding list: Header Entry. * encoding of PO files: Header Entry. * environment variables: envsubst Invocation. * envsubst program, usage: envsubst Invocation. * eval_gettext function, usage: eval_gettext Invocation. * eval_ngettext function, usage: eval_ngettext Invocation. * evolution of packages: Overview. * extracting parts of a PO file into a compendium: Creating Compendia. * file format, .mo: MO Files. * file format, .po: PO Files. * files, .po and .mo: Files. * files, .pot: Overview. * filter messages according to attributes: msgattrib Invocation. * find common messages: msgcomm Invocation. * force use of fuzzy entries: msgfmt Invocation. * format strings: c-format Flag. * Free Pascal: Pascal. * function attribute, __format__: xgettext Invocation. * function attribute, __format_arg__: xgettext Invocation. * fuzzy entries: Fuzzy Entries. * fuzzy flag: PO Files. * gawk: gawk. * gcc-internal-format flag: PO Files. * GCC-source: GCC-source. * generate binary message catalog from PO file: msgfmt Invocation. * generate translation catalog in English: msgen Invocation. * gettext files: Adjusting Files. * gettext installation: Installation. * gettext interface: Interface to gettext. * gettext program, usage: gettext Invocation. * gettext vs catgets: Comparison. * gettext, a programmer's view: gettext. * gettext.h file: lib/gettext.h. * gettextize program, usage: gettextize Invocation. * GUI programs: GUI program problems. * hash table, inside MO files: MO Files. * he, she, and they: Introduction. * header entry of a PO file: Header Entry. * help option: Preparing Strings. * history of GNU gettext: History. * i18n: Concepts. * importing PO files: Normalizing. * include file libintl.h <1>: lib/gettext.h. * include file libintl.h <2>: Comparison. * include file libintl.h <3>: Sources. * include file libintl.h: Overview. * initialization: Triggering. * initialize new PO file: msginit Invocation. * initialize translations from a compendium: Using Compendia. * installing gettext: Installation. * interface to catgets: Interface to catgets. * internationalization: Concepts. * inttypes.h: Preparing Strings. * ISO 3166: Country Codes. * ISO 639: Language Codes. * Java: Java. * Java mode, and msgfmt program: msgfmt Invocation. * Java mode, and msgunfmt program: msgunfmt Invocation. * Java, string concatenation: Preparing Strings. * java-format flag: PO Files. * keyboard accelerator checking: msgfmt Invocation. * l10n: Concepts. * language codes: Language Codes. * language selection: End Users. * language selection at runtime: gettext grok. * large package: Ambiguities. * libiconv library: AM_ICONV. * libintl for Java: Java. * libintl library: AM_GNU_GETTEXT. * librep Lisp: librep. * librep-format flag: PO Files. * LINGUAS file: po/LINGUAS. * link with libintl: Overview. * Linux <1>: Header Entry. * Linux <2>: Overview. * Linux: Aspects. * Lisp: Common Lisp. * lisp-format flag: PO Files. * list of translation teams, where to find: Header Entry. * locale facet, LC_ALL: Triggering. * locale facet, LC_COLLATE: Triggering. * locale facet, LC_CTYPE <1>: Triggering. * locale facet, LC_CTYPE: Aspects. * locale facet, LC_MESSAGES <1>: Triggering. * locale facet, LC_MESSAGES: Aspects. * locale facet, LC_MONETARY <1>: Triggering. * locale facet, LC_MONETARY: Aspects. * locale facet, LC_NUMERIC <1>: Triggering. * locale facet, LC_NUMERIC: Aspects. * locale facet, LC_RESPONSES: Triggering. * locale facet, LC_TIME <1>: Triggering. * locale facet, LC_TIME: Aspects. * locale facets: Aspects. * locale program: Header Entry. * localization: Concepts. * lookup message translation <1>: eval_gettext Invocation. * lookup message translation: gettext Invocation. * lookup plural message translation <1>: eval_ngettext Invocation. * lookup plural message translation: ngettext Invocation. * magic signature of MO files: MO Files. * Makevars file: po/Makevars. * manipulating PO files: Manipulating. * marking Perl sources: Perl. * marking string initializers: Special cases. * marking strings that require translation: Mark Keywords. * marking strings, preparations: Preparing Strings. * marking translatable strings: Overview. * menu entries: GUI program problems. * menu, keyboard accelerator support: msgfmt Invocation. * merge PO files: msgcat Invocation. * merging two PO files: Manipulating. * message catalog files location: Locating Catalogs. * messages: Aspects. * migration from earlier versions of gettext: Prerequisites. * mkinstalldirs file: mkinstalldirs. * mnemonics of menu entries: msgfmt Invocation. * MO file's format: MO Files. * modify message attrributes: msgattrib Invocation. * msgattrib program, usage: msgattrib Invocation. * msgcat program, usage: msgcat Invocation. * msgcmp program, usage: msgcmp Invocation. * msgcomm program, usage: msgcomm Invocation. * msgconv program, usage: msgconv Invocation. * msgen program, usage: msgen Invocation. * msgexec program, usage: msgexec Invocation. * msgfilter filter and catalog encoding: msgfilter Invocation. * msgfilter program, usage: msgfilter Invocation. * msgfmt program, usage: msgfmt Invocation. * msggrep program, usage: msggrep Invocation. * msgid: PO Files. * msgid_plural: PO Files. * msginit program, usage: msginit Invocation. * msgmerge program, usage: msgmerge Invocation. * msgstr: PO Files. * msgunfmt program, usage: msgunfmt Invocation. * msguniq program, usage: msguniq Invocation. * multi-line strings: Normalizing. * N_, a convenience macro: Comparison. * Native Language Support: Concepts. * Natural Language Support: Concepts. * newlines in PO files: PO Files. * ngettext: Plural forms. * ngettext program, usage: ngettext Invocation. * NLS: Concepts. * no-awk-format flag: PO Files. * no-c-format flag: PO Files. * no-c-format, and xgettext: c-format Flag. * no-elisp-format flag: PO Files. * no-gcc-internal-format flag: PO Files. * no-java-format flag: PO Files. * no-librep-format flag: PO Files. * no-lisp-format flag: PO Files. * no-objc-format flag: PO Files. * no-object-pascal-format flag: PO Files. * no-perl-brace-format flag: PO Files. * no-perl-format flag: PO Files. * no-php-format flag: PO Files. * no-python-format flag: PO Files. * no-qt-format flag: PO Files. * no-sh-format flag: PO Files. * no-smalltalk-format flag: PO Files. * no-tcl-format flag: PO Files. * no-ycp-format flag: PO Files. * nplurals, in a PO file header: Plural forms. * number format: Aspects. * objc-format flag: PO Files. * Object Pascal: Pascal. * object-pascal-format flag: PO Files. * obsolete entries: Obsolete Entries. * optimization of gettext functions: Optimized gettext. * orthography: Manipulating. * output to stdout, xgettext: xgettext Invocation. * overview of gettext: Overview. * package and version declaration in configure.in: configure.in. * package build and installation options: Installers. * package maintainer's view of gettext: Maintainers. * paragraphs: Preparing Strings. * Pascal: Pascal. * Perl: Perl. * Perl default keywords: Default Keywords. * Perl invalid string interpolation: Interpolation I. * Perl long lines: Long Lines. * Perl parentheses: Parentheses. * Perl pitfalls: Perl Pitfalls. * Perl quote-like expressions: Quote-like Expressions. * Perl special keywords for hash-lookups: Special Keywords. * Perl valid string interpolation: Interpolation II. * perl-brace-format flag: PO Files. * perl-format flag: PO Files. * PHP: PHP. * php-format flag: PO Files. * Pike: Pike. * plural form formulas: Plural forms. * plural forms: Plural forms. * plural forms, in MO files: MO Files. * plural forms, in PO files: PO Files. * plural, in a PO file header: Plural forms. * PO files' format: PO Files. * PO mode (Emacs) commands: Main PO Commands. * PO template file: Template. * po_file_domains: libgettextpo. * po_file_free: libgettextpo. * po_file_read: libgettextpo. * po_message_iterator: libgettextpo. * po_message_iterator_free: libgettextpo. * po_message_msgid: libgettextpo. * po_message_msgid_plural: libgettextpo. * po_message_msgstr: libgettextpo. * po_message_msgstr_plural: libgettextpo. * po_next_message: libgettextpo. * portability problems with sed: msgfilter Invocation. * POTFILES.in file: po/POTFILES.in. * preparing programs for translation: Sources. * preparing shell scripts for translation: Preparing Shell Scripts. * problems with catgets interface: Problems with catgets. * programming languages: Language Implementors. * Python: Python. * python-format flag: PO Files. * Qt format strings: xgettext Invocation. * Qt mode, and msgfmt program: msgfmt Invocation. * qt-format flag: PO Files. * quotation marks <1>: po/Makevars. * quotation marks: Header Entry. * quote characters, use in PO files: Header Entry. * related reading: References. * RST: RST. * scripting languages: Language Implementors. * search messages in a catalog: msggrep Invocation. * selecting message language: End Users. * sentences: Preparing Strings. * setting up gettext at build time: Installers. * setting up gettext at run time: End Users. * several domains: Ambiguities. * sex: Introduction. * sgettext: GUI program problems. * sh-format flag: PO Files. * she, he, and they: Introduction. * shell format string: envsubst Invocation. * shell scripts: sh. * Smalltalk: Smalltalk. * smalltalk-format flag: PO Files. * sorting msgcat output: msgcat Invocation. * sorting msgmerge output: msgmerge Invocation. * sorting msgunfmt output: msgunfmt Invocation. * sorting output of xgettext: xgettext Invocation. * specifying plural form in a PO file: Plural forms. * standard output, and msgcat: msgcat Invocation. * standard output, and msgmerge program: msgmerge Invocation. * string concatenation: Preparing Strings. * string normalization in entries: Normalizing. * style: Preparing Strings. * supported languages, xgettext: xgettext Invocation. * Tcl: Tcl. * Tcl mode, and msgfmt program: msgfmt Invocation. * Tcl mode, and msgunfmt program: msgunfmt Invocation. * tcl-format flag: PO Files. * template PO file: Overview. * testing .po files for equivalence: xgettext Invocation. * Tk's scripting language: Tcl. * translated entries: Translated Entries. * translating menu entries: GUI program problems. * translation aspects: Aspects. * Translation Matrix: Matrix. * Translation Project: Why. * turning off NLS support: lib/gettext.h. * tutorial of gettext usage: Overview. * unify duplicate translations: msguniq Invocation. * untranslated entries: Untranslated Entries. * update translations from a compendium: Using Compendia. * upgrading to new versions of gettext: Prerequisites. * version control for backup files, msgmerge: msgmerge Invocation. * wxWindows library: wxWindows. * xargs, and output from msgexec: msgexec Invocation. * xgettext program, usage: xgettext Invocation. * xmodmap program, and typing quotation marks: Header Entry. * YaST2 scripting language: YCP. * YCP: YCP. * ycp-format flag: PO Files.