aboutsummaryrefslogtreecommitdiff
path: root/doc/ref/guile/translation.texi
blob: 0e710c47eca2804fc79d196722a1d6ecaaf0e1b8 (plain)
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
@node Translation
@section Translation

Base for string translation in the application. Calp uses Guile's
built in gettext bindings. The text domain used is ``calp''.

@defun translate str
@anchor{translate}
Translate a string from english into an (through enviroment) specified
target language. All newlines in the source string will be changed to
spaces.

This procedure is both used as the ``backend'' for @ref{G_}, but also
for non-literal strings which should be translated.
@end defun

@defun G_ msg ...
@anchor{G_}
The ``global'' binding indicating a string to be translated.

All arguments must be strings, and will be concatenated before being
passed to @ref{translate} (meaning newlines will be ignored).
@end defun

@defun yes-no-check string [locale=%global-locale]
Checks @var{string} if it's a yes or no response in the given
@var{locale}.

Returns @code{'yes} or @code{'no}, or @code{#f} if the string couldn't
be parsed as a yes/no predicate in the current locale.
@end defun