open-vm-tools 9.4.0
lib/include/vmware/tools/i18n.h
Go to the documentation of this file.
00001 /*********************************************************
00002  * Copyright (C) 2010 VMware, Inc. All rights reserved.
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published
00006  * by the Free Software Foundation version 2.1 and no later version.
00007  *
00008  * This program is distributed in the hope that it will be useful, but
00009  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00010  * or FITNESS FOR A PARTICULAR PURPOSE.  See the Lesser GNU General Public
00011  * License for more details.
00012  *
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this program; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA.
00016  *
00017  *********************************************************/
00018 
00019 #ifndef _I18N_H_
00020 #define _I18N_H_
00021 
00050 #include <glib.h>
00051 
00052 /*
00053  * Copied from msgid.h to avoid exposing VMware internal headers. Don't
00054  * change these values. Ever.
00055  */
00056 #define MSG_MAGIC       "@&!*@*@"
00057 #define MSG_MAGIC_LEN   7
00058 #define MSGID(id)       MSG_MAGIC "(" #id ")"
00059 
00068 #define SU_(msgid, en) VMTools_GetString(VMW_TEXT_DOMAIN, MSGID(msgid) en)
00069 
00070 #if defined(_WIN32)
00071 
00079 #  define SW_(msgid, en) VMTools_GetUtf16String(VMW_TEXT_DOMAIN, MSGID(msgid) en)
00080 #endif
00081 
00082 G_BEGIN_DECLS
00083 
00084 void
00085 VMTools_BindTextDomain(const char *domain,
00086                        const char *locale,
00087                        const char *catdir);
00088 
00089 const char *
00090 VMTools_GetString(const char *domain,
00091                   const char *msgid);
00092 
00093 #if defined(_WIN32)
00094 const wchar_t *
00095 VMTools_GetUtf16String(const char *domain,
00096                        const char *msgid);
00097 #endif
00098 
00099 G_END_DECLS
00100 
00103 #endif /* _I18N_H_ */
00104