1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2024 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@node Scheme
@subsection GNU guile - Scheme
@cindex Scheme
@cindex Guile
@cindex guile
@table @asis
@item RPMs
guile
@item Ubuntu packages
guile-2.0
@item File extension
@code{scm}
@item String syntax
@code{"abc"}
@item gettext shorthand
@code{(_ "abc")}, @code{_"abc"} (GIMP script-fu extension)
@item gettext/ngettext functions
@code{gettext}, @code{ngettext}
@item textdomain
@code{textdomain}
@item bindtextdomain
@code{bindtextdomain}
@item setlocale
@code{(catch #t (lambda () (setlocale LC_ALL "")) (lambda args #f))}
@item Prerequisite
@code{(use-modules (ice-9 format))}
@item Use or emulate GNU gettext
use
@item Extractor
@code{xgettext -L Guile -k_}
@cindex Scheme
@cindex Guile
@samp{xgettext -L Scheme} and @samp{xgettext -L Guile} are nearly equivalent.
They differ in the interpretation of escape sequences in string literals:
While @samp{xgettext -L Scheme} assumes the
@uref{https://www.r6rs.org/,,R6RS} and
@uref{https://standards.scheme.org/corrected-r7rs/r7rs.html,,R7RS}
syntax of string literals,
@samp{xgettext -L Guile} assumes the syntax of string literals
understood by Guile 2.x and 3.0
(without command-line option @code{--r6rs} or @code{--r7rs},
and before a @code{#!r6rs} directive is seen).
After a @code{#!r6rs} directive,
there is no difference any more
between @samp{xgettext -L Scheme} and @samp{xgettext -L Guile}
for the rest of the file.
@item Formatting with positions
@c @code{format "~1@@*~D ~0@@*~D~2@@*"}, requires @code{(use-modules (ice-9 format))}
@c not yet supported
---
@item Portability
On platforms without gettext, no translation.
@item po-mode marking
---
@end table
An example is available in the @file{examples} directory: @code{hello-guile}.
|