Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

NCi18n.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:         NCi18n.h
00014 
00015   Authors:      Gabriele Strattner <gs@suse.de>
00016 
00017 /-*/
00018 
00019 // -*- c++ -*-
00020 
00021 #ifndef NCi18n_h
00022 #define NCi18n_h
00023 
00024 #include <libintl.h>
00025 
00026 
00033 inline string _(const char * msgid)
00034 {
00035     return gettext(msgid);
00036 }
00037 
00045 inline string _(const char * msgid1, const char * msgid2, unsigned long int n)
00046 {
00047     return ngettext(msgid1, msgid2, n);
00048 }
00049 
00050 inline void setTextdomain( const char * domain )
00051 {
00052     bindtextdomain( domain, LOCALEDIR );
00053     bind_textdomain_codeset( domain, "utf8" );
00054     textdomain( domain );
00055 
00056     // Make change known.
00057     {
00058         extern int _nl_msg_cat_cntr;
00059         ++_nl_msg_cat_cntr;
00060     }
00061 }
00062 
00063 #endif // NCi18n_h

Generated on Wed Sep 14 10:52:54 2005 for yast2-ncurses by  doxygen 1.4.4