libzypp  15.28.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 
18 #define N_(MSG) MSG
19 
20 #ifdef ZYPP_DLL //defined if zypp is compiled as DLL
21 
23 #define _(MSG) ::zypp::gettext::dgettext( MSG )
24 
26 #define PL_(MSG1,MSG2,N) ::zypp::gettext::dngettext( MSG1, MSG2, N )
27 
28 #else
29 #define _(MSG) ::gettext( MSG )
30 #define PL_(MSG1,MSG2,N) ::ngettext( MSG1, MSG2, N )
31 #endif
32 
34 namespace zypp
35 {
36  namespace gettext
38  {
39 
41  const char * dgettext( const char * msgid );
42 
44  const char * dngettext( const char * msgid1, const char * msgid2,
45  unsigned long n );
46 
48  } // namespace gettext
51 } // namespace zypp
53 #endif // ZYPP_BASE_GETTEXT_H
const char * dgettext(const char *msgid)
Return translated text.
Definition: Gettext.cc:45
const char * dngettext(const char *msgid1, const char *msgid2, unsigned long n)
Return translated text (plural form).
Definition: Gettext.cc:51