diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-02 21:50:19 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-21 20:21:13 -0400 |
commit | b90289428478fb039e4fa6cb58b863c0baa2af9f (patch) | |
tree | 36f03056e5fcd639a06787813f547176544bffe8 /src | |
parent | 66c5cd44277863708fdc81a6418bc84215b0c269 (diff) | |
download | fork-ledger-b90289428478fb039e4fa6cb58b863c0baa2af9f.tar.gz fork-ledger-b90289428478fb039e4fa6cb58b863c0baa2af9f.tar.bz2 fork-ledger-b90289428478fb039e4fa6cb58b863c0baa2af9f.zip |
Added support for using GNU gettext
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cc | 2 | ||||
-rw-r--r-- | src/system.hh | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc index 58b3f169..89a438c7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -75,6 +75,8 @@ int main(int argc, char * argv[], char * envp[]) std::signal(SIGINT, sigint_handler); std::signal(SIGPIPE, sigpipe_handler); + ::textdomain("ledger"); + // Create the session object, which maintains nearly all state relating to // this invocation of Ledger; and register all known journal parsers. std::auto_ptr<global_scope_t> global_scope(new global_scope_t(envp)); diff --git a/src/system.hh b/src/system.hh index 080d187f..b9f6b96f 100644 --- a/src/system.hh +++ b/src/system.hh @@ -135,6 +135,13 @@ typedef std::ostream::pos_type ostream_pos_type; #include <sys/wait.h> #include "fdstream.h" #endif +#if defined(HAVE_GETTEXT) +#include "gettext.h" +#define _(str) gettext(str) +#else +#define textdomain(name) +#define _(str) str +#endif #include <gmp.h> #include <mpfr.h> |