lilypond-1.1.47
[lilypond.git] / flower / international.cc
blob9f8003961ad27ce31c57ebed76448d994505fb62
1 /*
2 international.cc -- implement stuff for internationalisation
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Jan Nieuwenhuizen <janneke@gnu.org>
8 */
10 #include <stdarg.h>
11 #include "config.hh"
12 #include "string-convert.hh"
13 #include "international.hh"
15 #if !HAVE_GETTEXT
16 inline char*
17 gettext (char const* s)
19 return s;
21 #else
22 #include <libintl.h>
23 #endif
25 String
26 _ (char const *ch)
28 return String (gettext (ch));
31 String
32 _f (char const* format, ...)
34 va_list args;
35 va_start (args, format);
36 String str = String_convert::vform_str (gettext (format), args);
37 va_end (args);
38 return str;
41 String
42 _f (char const* format, String s, String s2, String s3)
44 return String_convert::form_str (gettext (format), s.ch_C (), s2.ch_C (),
45 s3.ch_C ());