]> icculus.org git repositories - duncan/yast2-qt4.git/blob - src/YQi18n.h
picking up branches/tmp/sh/qt4-port/, merging it with trunk
[duncan/yast2-qt4.git] / src / YQi18n.h
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:         YQi18n.h
14
15   Author:       Stefan Hundhammer <sh@suse.de>
16
17 /-*/
18
19
20 #ifndef YQi18n_h
21 #define YQi18n_h
22
23 #include <libintl.h>
24 #include <qstring.h>
25
26
27 inline QString _( const char * msgid )
28 {
29         return ( !msgid || !*msgid ) ? "" : QString::fromUtf8( gettext(msgid ) );
30 }
31
32 inline QString _( const char * msgid1, const char * msgid2, unsigned long int n )
33 {
34         return QString::fromUtf8( ngettext(msgid1, msgid2, n ) );
35 }
36
37
38 #endif // YQi18n_h