libzypp: zypp-core/base/Gettext.h Source File

libzypp 17.36.6

Gettext.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
14#ifndef ZYPP_BASE_GETTEXT_H
15#define ZYPP_BASE_GETTEXT_H
16
17#include <zypp/Globals.h>
18
19#ifdef ZYPP_DLL //defined if zypp is compiled as DLL
20
22#undef N_
23#define N_(MSG) MSG
24
26#undef _
27#define _(MSG) ::zypp::gettext::dgettext( MSG )
28
30#undef PL_
31#define PL_(MSG1,MSG2,N) ::zypp::gettext::dngettext( MSG1, MSG2, N )
32
33#else
34
35#ifndef N_
36#define N_(MSG) MSG
37#endif
38#ifndef _
39#define _(MSG) ::gettext( MSG )
40#endif
41#ifndef PL_
42#define PL_(MSG1,MSG2,N) ::ngettext( MSG1, MSG2, N )
43#endif
44
45#endif
46
48namespace zypp
49{
51 namespace gettext
52 {
53
55 const char * dgettext( const char * msgid ) ZYPP_API;
56
58 const char * dngettext( const char * msgid1, const char * msgid2,
59 unsigned long n ) ZYPP_API;
60
62 } // namespace gettext
65} // namespace zypp
67#endif // ZYPP_BASE_GETTEXT_H
zypp::gettext::dngettext
const char * dngettext(const char *msgid1, const char *msgid2, unsigned long n)
Return translated text (plural form).
Definition Gettext.cc:51
zypp::gettext::dgettext
const char * dgettext(const char *msgid)
Return translated text.
Definition Gettext.cc:45
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition Application.cc:20
ZYPP_API
#define ZYPP_API
Definition Globals.h:69
Globals.h