Bumped copyright dates for 2013
[barry.git] / desktop / src / i18n.h
blobb3b2b8ae0048b574f8b58d06d7f9b60602885d5b
1 ///
2 /// \file i18n.h
3 /// Internationalization header
4 ///
5 /// Note: the i18n headers are intentionally split between non-wxWidgets code
6 /// and wxWidgets code, via i18n.h and wxi18n.h. This is so that,
7 /// wxWidgets's version of _() is guaranteed to be removed in favour
8 /// of our own _W(), and so prevent confusion. Also, the osyncwrap
9 /// library code does not strictly depend on wxWidgets, and so should
10 /// not use any of its headers nor defines nor its wxString. Keeping
11 /// libosyncwrap separate should make it easier to turn it into a
12 /// standalone library someday.
13 ///
16 Copyright (C) 2012-2013, Net Direct Inc. (http://www.netdirect.ca/)
18 This program is free software; you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation; either version 2 of the License, or
21 (at your option) any later version.
23 This program is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 See the GNU General Public License in the COPYING file at the
28 root directory of this project for more details.
31 #ifndef __BARRY_DESKTOP_I18N_H__
32 #define __BARRY_DESKTOP_I18N_H__
34 // Make sure that wxi18n.h is not included in this module
35 #ifdef __BARRY_DESKTOP_WXI18N_H__
36 #error Cannot include both i18n.h and wxi18n.h in same module.
37 #endif
39 #include <config.h>
40 #include <locale.h>
42 // Set the DEFAULT_TEXT_DOMAIN so that gettext.h uses dgettext()
43 // instead of gettext(). This way we don't have to call textdomain()
44 // and hope that nobody changes it on us later.
45 #define DEFAULT_TEXT_DOMAIN "barryosyncwrap"
46 #include "gettext.h"
48 // Define our own macro for plain const char* strings, so that
49 // there is no conflict with wxWidgets. For std::string(_C("blah blah")).
50 #define _C(x) gettext(x)
52 // Convenience macro for main().
53 #define INIT_I18N() { \
54 bindtextdomain("barryosyncwrap", LOCALEDIR); \
57 #endif