summaryrefslogtreecommitdiffstats
path: root/tools/mpicalc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mpicalc.c')
-rw-r--r--tools/mpicalc.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/mpicalc.c b/tools/mpicalc.c
index 28c498548..0bee7fc42 100644
--- a/tools/mpicalc.c
+++ b/tools/mpicalc.c
@@ -31,6 +31,7 @@
#include "util.h"
#include "mpi.h"
+#include "i18n.h"
#define STACKSIZE 100
static MPI stack[STACKSIZE];
@@ -62,6 +63,21 @@ strusage( int level )
static void
+i18n_init(void)
+{
+ #ifdef HAVE_LIBINTL
+ #ifdef HAVE_LC_MESSAGES
+ setlocale( LC_MESSAGES, "" );
+ #else
+ setlocale( LC_ALL, "" );
+ #endif
+ bindtextdomain( PACKAGE, G10_LOCALEDIR );
+ textdomain( PACKAGE );
+ #endif
+}
+
+
+static void
do_add(void)
{
if( stackidx < 2 ) {
@@ -201,6 +217,7 @@ main(int argc, char **argv)
char strbuf[1000];
int stridx=0;
+ i18n_init();
while( arg_parse( &pargs, opts) ) {
switch( pargs.r_opt ) {
default : pargs.err = 2; break;