@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}.
