home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gettext-0.10.24-bin.lha / info / gettext.info-5 (.txt) < prev   
GNU Info File  |  1996-10-12  |  19KB  |  429 lines

  1. This is Info file gettext.info, produced by Makeinfo-1.64 from the
  2. input file /ade-src/fsf/gettext/doc/gettext.texi.
  3. START-INFO-DIR-ENTRY
  4. * Gettext Utilities: (gettext).        GNU gettext utilities.
  5. * gettextize: (gettext)gettextize Invocation.    Prepare a package for gettext.
  6. * msgfmt: (gettext)msgfmt Invocation.        Make MO files out of PO files.
  7. * msgmerge: (gettext)msgmerge Invocation.    Update two PO files into one.
  8. * xgettext: (gettext)xgettext Invocation.    Extract strings into a PO file.
  9. END-INFO-DIR-ENTRY
  10.    This file provides documentation for GNU `gettext' utilities.
  11.    Copyright (C) 1995 Free Software Foundation, Inc.
  12.    Permission is granted to make and distribute verbatim copies of this
  13. manual provided the copyright notice and this permission notice are
  14. preserved on all copies.
  15.    Permission is granted to copy and distribute modified versions of
  16. this manual under the conditions for verbatim copying, provided that
  17. the entire resulting derived work is distributed under the terms of a
  18. permission notice identical to this one.
  19.    Permission is granted to copy and distribute translations of this
  20. manual into another language, under the above conditions for modified
  21. versions, except that this permission notice may be stated in a
  22. translation approved by the Foundation.
  23. File: gettext.info,  Node: configure.in,  Next: aclocal,  Prev: po/POTFILES,  Up: Adjusting Files
  24. `configure.in' at top level
  25. ---------------------------
  26.   1. Declare the package and version.
  27.      This is done by a set of lines like these:
  28.           PACKAGE=gettext
  29.           VERSION=0.10.24
  30.           AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
  31.           AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
  32.           AC_SUBST(PACKAGE)
  33.           AC_SUBST(VERSION)
  34.      Of course, you replace `gettext' with the name of your package,
  35.      and `0.10.24' by its version numbers, exactly as they should
  36.      appear in the packaged `tar' file name of your distribution
  37.      (`gettext-0.10.24.tar.gz', here).
  38.   2. Declare the available translations.
  39.      This is done by defining `ALL_LINGUAS' to the white separated,
  40.      quoted list of available languages, in a single line, like this:
  41.           ALL_LINGUAS="de fr"
  42.      This example means that German and French PO files are available,
  43.      so that these languages are currently supported by your package.
  44.      If you want to further restrict, at installation time, the set of
  45.      installed languages, this should not be done by modifying
  46.      `ALL_LINGUAS' in `configure.in', but rather by using the `LINGUAS'
  47.      environment variable (*note Installers::.).
  48.   3. Check for internationalization support.
  49.      Here is the main `m4' macro for triggering internationalization
  50.      support.  Just add this line to `configure.in':
  51.           ud_GNU_GETTEXT
  52.      This call is purposely simple, even if it generates a lot of
  53.      configure time checking and actions.
  54.   4. Obtain some `libintl.h' header file.
  55.      Once you called `ud_GNU_GETTEXT' in `configure.in', use:
  56.           AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
  57.      This will create one header file `libintl.h'.  The reason for this
  58.      has to do with the fact that some systems, using the Uniforum
  59.      message handling functions, already have a file of this name.
  60.      The `AC_LINK_FILES' call has not been integrated into the
  61.      `ud_GNU_GETTEXT' macro because there can be only one such call in
  62.      a `configure' file.  If you already use it, you will have to
  63.      *merge* the needed `AC_LINK_FILES' within yours, by adding the
  64.      first argument at the end of the list of your first argument, and
  65.      adding the second argument at the end of the list of your second
  66.      argument.
  67.   5. Have output files created.
  68.      The `AC_OUTPUT' directive, at the end of your `configure.in' file,
  69.      needs to be modified in two ways:
  70.           AC_OUTPUT([EXISTING CONFIGURATION FILES intl/Makefile po/Makefile.in],
  71.           [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  72.           EXISTING ADDITIONAL ACTIONS])
  73.      The modification to the first argument to `AC_OUTPUT' asks for
  74.      substitution in the `intl/' and `po/' directories.  Note the `.in'
  75.      suffix used for `po/' only.  This is because the distributed file
  76.      is really `po/Makefile.in.in'.
  77.      The modification to the second argument ensures that `po/Makefile'
  78.      gets generated out of the `po/Makefile.in' just created, including
  79.      in it the `po/POTFILES' produced by `ud_GNU_GETTEXT'.  Two steps
  80.      are needed because `po/POTFILES' can get lengthy in some packages,
  81.      too lengthy in fact for being able to merely use an Autoconf
  82.      substituted variable, as many `sed's cannot handle very long lines.
  83. File: gettext.info,  Node: aclocal,  Next: acconfig,  Prev: configure.in,  Up: Adjusting Files
  84. `aclocal.m4' at top level
  85. -------------------------
  86.    If you do not have an `aclocal.m4' file in your distribution, the
  87. simplest is taking a copy of `aclocal.m4' from GNU `gettext'.  But to
  88. be precise, you only need macros `ud_LC_MESSAGES', `ud_WITH_NLS' and
  89. `ud_GNU_GETTEXT', and `md_PATH_PROG', which is called by `ud_WITH_NLS',
  90. so you may use an editor and remove macros you do not need.
  91.    If you already have an `aclocal.m4' file, then you will have to
  92. merge the said macros into your `aclocal.m4'.  Note that if you are
  93. upgrading from a previous release of GNU `gettext', you should most
  94. probably *replace* the said macros, as they usually change a little
  95. from one release of GNU `gettext' to the next.  Their contents may vary
  96. as we get more experience with strange systems out there.
  97.    These macros check for the internationalization support functions
  98. and related informations.  Hopefully, once stabilized, these macros
  99. might be integrated in the standard Autoconf set, because this piece of
  100. `m4' code will be the same for all projects using GNU `gettext'.
  101. File: gettext.info,  Node: acconfig,  Next: Makefile,  Prev: aclocal,  Up: Adjusting Files
  102. `acconfig.h' at top level
  103. -------------------------
  104.    If you do not have an `acconfig.h' file in your distribution, the
  105. simplest is use take a copy of `acconfig.h' from GNU `gettext'.  But to
  106. be precise, you only need the lines and comments for `ENABLE_NLS',
  107. `HAVE_CATGETS', `HAVE_GETTEXT' and `HAVE_LC_MESSAGES', `HAVE_STPCPY',
  108. `PACKAGE' and `VERSION', so you may use an editor and remove everything
  109. else.  If you already have an `acconfig.h' file, then you should merge
  110. the said definitions into your `acconfig.h'.
  111. File: gettext.info,  Node: Makefile,  Next: src/Makefile,  Prev: acconfig,  Up: Adjusting Files
  112. `Makefile.in' at top level
  113. --------------------------
  114.    Here are a few modifications you need to make to your main, top-level
  115. `Makefile.in' file.
  116.   1. Add the following lines near the beginning of your `Makefile.in',
  117.      so the `dist:' goal will work properly (as explained further down):
  118.           PACKAGE = @PACKAGE@
  119.           VERSION = @VERSION@
  120.   2. Add file `NLS' to the `DISTFILES' definition, so the file gets
  121.      distributed.
  122.   3. Wherever you process subdirectories in your `Makefile.in', be sure
  123.      you also process dir subdirectories `intl' and `po'.  Special
  124.      rules in the `Makefiles' take care for the case where no
  125.      internationalization is wanted.
  126.      Here is an example of a canonical order of processing.  In this
  127.      example, we also define `SUBDIRS' in `Makefile.in' for it to be
  128.      further used in the `dist:' goal.
  129.           SUBDIRS = doc lib @INTLSUB@ src @POSUB@
  130.      that you will have to adapt to your own package.
  131.   4. A delicate point is the `dist:' goal, as both `intl/Makefile' and
  132.      `po/Makefile' will later assume that the proper directory has been
  133.      set up from the main `Makefile'.  Here is an example at what the
  134.      `dist:' goal might look like:
  135.           distdir = $(PACKAGE)-$(VERSION)
  136.           dist: Makefile
  137.               rm -fr $(distdir)
  138.               mkdir $(distdir)
  139.               chmod 777 $(distdir)
  140.               for file in $(DISTFILES); do \
  141.                 ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
  142.               done
  143.               for subdir in $(SUBDIRS); do \
  144.                 mkdir $(distdir)/$$subdir || exit 1; \
  145.                 chmod 777 $(distdir)/$$subdir; \
  146.                 (cd $$subdir && $(MAKE) $@) || exit 1; \
  147.               done
  148.               tar chozf $(distdir).tar.gz $(distdir)
  149.               rm -fr $(distdir)
  150. File: gettext.info,  Node: src/Makefile,  Prev: Makefile,  Up: Adjusting Files
  151. `Makefile.in' in `src/'
  152. -----------------------
  153.    Some of the modifications made in the main `Makefile.in' will also
  154. be needed in the `Makefile.in' from your package sources, which we
  155. assume here to be in the `src/' subdirectory.  Here are all the
  156. modifications needed in `src/Makefile.in':
  157.   1. In view of the `dist:' goal, you should have these lines near the
  158.      beginning of `src/Makefile.in':
  159.           PACKAGE = @PACKAGE@
  160.           VERSION = @VERSION@
  161.   2. If not done already, you should guarantee that `top_srcdir' gets
  162.      defined.  This will serve for `cpp' include files.  Just add the
  163.      line:
  164.           top_srcdir = @top_srcdir@
  165.   3. You might also want to define `subdir' as `src', later allowing
  166.      for almost uniform `dist:' goals in all your `Makefile.in'.  At
  167.      list, the `dist:' goal below assume that you used:
  168.           subdir = src
  169.   4. You should ensure that the final linking will use `@INTLLIBS@' as
  170.      a library.  An easy way to achieve this is to manage that it gets
  171.      into `LIBS', like this:
  172.           LIBS = @INTLLIBS@ @LIBS@
  173.      In most GNU packages one will find a directory `lib/' in which a
  174.      library containing some helper functions will be build.  (You need
  175.      at least the few functions which the GNU `gettext' Library itself
  176.      needs.)  However some of the functions in the `lib/' also give
  177.      messages to the user which of course should be translated, too.
  178.      Taking care of this it is not enough to place the support library
  179.      (say `libsupport.a') just between the `@INTLLIBS@' and `@LIBS@' in
  180.      the above example.  Instead one has to write this:
  181.           LIBS = ../lib/libsupport.a @INTLLIBS@ ../lib/libsupport.a @LIBS@
  182.   5. You should also ensure that directory `intl/' will be searched for
  183.      C preprocessor include files in all circumstances.  So, you have to
  184.      manage so both `-I../intl' and `-I$(top_srcdir)/intl' will be
  185.      given to the C compiler.
  186.   6. Your `dist:' goal has to conform with others.  Here is a
  187.      reasonable definition for it:
  188.           distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  189.           dist: Makefile $(DISTFILES)
  190.               for file in $(DISTFILES); do \
  191.                 ln $$file $(distdir) 2>/dev/null || cp -p $$file $(distdir); \
  192.               done
  193. File: gettext.info,  Node: Conclusion,  Next: Country Codes,  Prev: Maintainers,  Up: Top
  194. Concluding Remarks
  195. ******************
  196.    We would like to conclude this GNU `gettext' manual by presenting an
  197. history of the GNU Translation Project so far.  We finally give a few
  198. pointers for those who want to do further research or readings about
  199. Native Language Support matters.
  200. * Menu:
  201. * History::                     History of GNU `gettext'
  202. * References::                  Related Readings
  203. File: gettext.info,  Node: History,  Next: References,  Prev: Conclusion,  Up: Conclusion
  204. History of GNU `gettext'
  205. ========================
  206.    Internationalization concerns and algorithms have been informally
  207. and casually discussed for years in GNU, sometimes around GNU `libc',
  208. maybe around the incoming `Hurd', or otherwise (nobody clearly
  209. remembers).  And even then, when the work started for real, this was
  210. somewhat independently of these previous discussions.
  211.    This all began in July 1994, when Patrick D'Cruze had the idea and
  212. initiative of internationalizing version 3.9.2 of GNU `fileutils'.  He
  213. then asked Jim Meyering, the maintainer, how to get those changes
  214. folded into an official release.  That first draft was full of
  215. `#ifdef's and somewhat disconcerting, and Jim wanted to find nicer
  216. ways.  Patrick and Jim shared some tries and experimentations in this
  217. area.  Then, feeling that this might eventually have a deeper impact on
  218. GNU, Jim wanted to know what standards were, and contacted Richard
  219. Stallman, who very quickly and verbally described an overall design for
  220. what was meant to become `glocale', at that time.
  221.    Jim implemented `glocale' and got a lot of exhausting feedback from
  222. Patrick and Richard, of course, but also from Mitchum DSouza (who wrote
  223. a `catgets'-like package), Roland McGrath, maybe David MacKenzie,
  224. Franc,ois Pinard, and Paul Eggert, all pushing and pulling in various
  225. directions, not always compatible, to the extent that after a couple of
  226. test releases, `glocale' was torn apart.
  227.    While Jim took some distance and time and became dad for a second
  228. time, Roland wanted to get GNU `libc' internationalized, and got Ulrich
  229. Drepper involved in that project.  Instead of starting from `glocale',
  230. Ulrich rewrote something from scratch, but more conformant to the set
  231. of guidelines who emerged out of the `glocale' effort.  Then, Ulrich
  232. got people from the previous forum to involve themselves into this new
  233. project, and the switch from `glocale' to what was first named
  234. `msgutils', renamed `nlsutils', and later `gettext', became officially
  235. accepted by Richard in May 1995 or so.
  236.    Let's summarize by saying that Ulrich Drepper wrote GNU `gettext' in
  237. April 1995.  The first official release of the package, including PO
  238. mode, occurred in July 1995, and was numbered 0.7.  Other people
  239. contributed to the effort by providing a discussion forum around
  240. Ulrich, writing little pieces of code, or testing.  These are quoted in
  241. the `THANKS' file which comes with the GNU `gettext' distribution.
  242.    While this was being done, Franc,ois adapted half a dozen of GNU
  243. packages to `glocale' first, then later to `gettext', putting them in
  244. pretest, so providing along the way an effective user environment for
  245. fine tuning the evolving tools.  He also took the responsibility of
  246. organizing and coordinating the GNU Translation Project.  After nearly
  247. a year of informal exchanges between people from many countries,
  248. translator teams started to exist in May 1995, through the creation and
  249. support by Patrick D'Cruze of twenty unmoderated mailing lists for that
  250. many native languages, and two moderated lists: one for reaching all
  251. teams at once, the other for reaching all maintainers of
  252. internationalized packages in GNU.
  253.    Franc,ois also wrote PO mode in June 1995 with the collaboration of
  254. Greg McGary, as a kind of contribution to Ulrich's package.  He also
  255. gave a hand with the GNU `gettext' Texinfo manual.
  256. File: gettext.info,  Node: References,  Prev: History,  Up: Conclusion
  257. Related Readings
  258. ================
  259.    Eugene H. Dorr (`dorre@well.com') maintains an interesting
  260. bibliography on internationalization matters, called
  261. `Internationalization Reference List', which is available as:
  262.      ftp://ftp.ora.com/pub/examples/nutshell/ujip/doc/i18n-books.txt
  263.    Michael Gschwind (`mike@vlsivie.tuwien.ac.at') maintains a
  264. Frequently Asked Questions (FAQ) list, entitled `Programming for
  265. Internationalisation'.  This FAQ discusses writing programs which can
  266. handle different language conventions, character sets, etc.; and is
  267. applicable to all character set encodings, with particular emphasis on
  268. ISO 8859-1.  It is regularly published in Usenet groups
  269. `comp.unix.questions', `comp.std.internat',
  270. `comp.software.international', `comp.lang.c', `comp.windows.x',
  271. `comp.std.c', `comp.answers' and `news.answers'.  The home location of
  272. this document is:
  273.      ftp://ftp.vlsivie.tuwien.ac.at/pub/8bit/ISO-programming
  274.    Patrick D'Cruze (`pdcruze@li.org') wrote a tutorial about NLS
  275. matters, and Jochen Hein (`Hein@student.tu-clausthal.de') took over the
  276. responsibility of maintaining it.  It may be found as:
  277.      ftp://sunsite.unc.edu/pub/Linux/utils/nls/catalogs/Incoming/...
  278.           ...locale-tutorial-0.8.txt.gz
  279. This site is mirrored in:
  280.      ftp://ftp.ibp.fr/pub/linux/sunsite/
  281.    A French version of the same tutorial should be findable at:
  282.      ftp://ftp.ibp.fr/pub/linux/french/docs/
  283. together with French translations of many Linux-related documents.
  284. File: gettext.info,  Node: Country Codes,  Prev: Conclusion,  Up: Top
  285. Country Codes
  286. *************
  287.    The ISO 639 standard defines two character codes for many countries.
  288. All abreviations for countries or languages used in the GNU translation
  289. project should come from this standard.
  290.      Afar.
  291.      Abkhazian.
  292.      Afrikaans.
  293.      Amharic.
  294.      Arabic.
  295.      Assamese.
  296.      Aymara.
  297.      Azerbaijani.
  298.      Bashkir.
  299.      Byelorussian.
  300.      Bulgarian.
  301.      Bihari.
  302.      Bislama.
  303.      Bengali; Bangla.
  304.      Tibetan.
  305.      Breton.
  306.      Catalan.
  307.      Corsican.
  308.      Czech.
  309.      Welsh.
  310.      Danish.
  311.      German.
  312.      Bhutani.
  313.      Greek.
  314.      English.
  315.      Esperanto.
  316.      Spanish.
  317.      Estonian.
  318.      Basque.
  319.      Persian.
  320.      Finnish.
  321.      Fiji.
  322.      Faroese.
  323.      French.
  324.      Frisian.
  325.      Irish.
  326.      Scots Gaelic.
  327.      Galician.
  328.      Guarani.
  329.      Gujarati.
  330.      Hausa.
  331.      Hebrew (formerly iw).
  332.      Hindi.
  333.      Croatian.
  334.      Hungarian.
  335.      Armenian.
  336.      Interlingua.
  337.      Indonesian (formerly in).
  338.      Interlingue.
  339.      Inupiak.
  340.      Icelandic.
  341.      Italian.
  342.      Inuktitut.
  343.      Japanese.
  344.      Javanese.
  345.      Georgian.
  346.      Kazakh.
  347.      Greenlandic.
  348.      Cambodian.
  349.      Kannada.
  350.      Korean.
  351.      Kashmiri.
  352.      Kurdish.
  353.      Kirghiz.
  354.      Latin.
  355.      Lingala.
  356.      Laothian.
  357.      Lithuanian.
  358.      Latvian, Lettish.
  359.      Malagasy.
  360.      Maori.
  361.      Macedonian.
  362.      Malayalam.
  363.      Mongolian.
  364.      Moldavian.
  365.      Marathi.
  366.      Malay.
  367.      Maltese.
  368.      Burmese.
  369.      Nauru.
  370.      Nepali.
  371.      Dutch.
  372.      Norwegian.
  373.      Occitan.
  374.      (Afan) Oromo.
  375.      Oriya.
  376.      Punjabi.
  377.      Polish.
  378.      Pashto, Pushto.
  379.      Portuguese.
  380.      Quechua.
  381.      Rhaeto-Romance.
  382.      Kirundi.
  383.      Romanian.
  384.      Russian.
  385.      Kinyarwanda.
  386.      Sanskrit.
  387.      Sindhi.
  388.      Sangro.
  389.      Serbo-Croatian.
  390.      Sinhalese.
  391.      Slovak.
  392.      Slovenian.
  393.      Samoan.
  394.      Shona.
  395.      Somali.
  396.      Albanian.
  397.      Serbian.
  398.      Siswati.
  399.      Sesotho.
  400.      Sundanese.
  401.      Swedish.
  402.      Swahili.
  403.      Tamil.
  404.      Telugu.
  405.      Tajik.
  406.      Thai.
  407.      Tigrinya.
  408.      Turkmen.
  409.      Tagalog.
  410.      Setswana.
  411.      Tonga.
  412.      Turkish.
  413.      Tsonga.
  414.      Tatar.
  415.      Twi.
  416.      Uighur.
  417.      Ukrainian.
  418.      Urdu.
  419.      Uzbek.
  420.      Vietnamese.
  421.      Volapuk.
  422.      Wolof.
  423.      Xhosa.
  424.      Yiddish (formerly ji).
  425.      Yoruba.
  426.      Zhuang.
  427.      Chinese.
  428.      Zulu.
  429.