]> git.donarmstrong.com Git - lilypond.git/blob - flower/international.cc
* configure.in (--enable-std-vector): New option.
[lilypond.git] / flower / international.cc
1 /*
2   international.cc -- implement stuff for internationalisation
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2006 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "config.hh"
10
11 #include "international.hh"
12 #include "string-convert.hh"
13
14 #if !HAVE_GETTEXT
15 inline char *
16 gettext (char const *s)
17 {
18   return (char *)s;
19 }
20 #else
21 #include <libintl.h>
22 #endif
23
24 std::string
25 _ (char const *ch)
26 {
27   return std::string (gettext (ch));
28 }
29
30 std::string
31 _f (char const *format, ...)
32 {
33   va_list args;
34   va_start (args, format);
35   std::string str = String_convert::vform_string (gettext (format), args);
36   va_end (args);
37   return str;
38 }
39
40 std::string
41 _f (char const *format, std::string s, std::string s2, std::string s3)
42 {
43   return String_convert::form_string (gettext (format), s.c_str (), s2.c_str (),
44                                       s3.c_str ());
45 }