fix cr/lfs and remove trailing whitespaces...
[supertux.git] / src / gettext.hpp
1 /*
2    This program is free software; you can redistribute it and/or modify it
3    under the terms of the GNU Library General Public License as published
4    by the Free Software Foundation; either version 2, or (at your option)
5    any later version.
6
7    This program is distributed in the hope that it will be useful,
8    but WITHOUT ANY WARRANTY; without even the implied warranty of
9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10    Library General Public License for more details.
11
12    You should have received a copy of the GNU Library General Public
13    License along with this program; if not, write to the Free Software
14    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15    USA.  */
16 #ifndef _LIBGETTEXT_H
17 #define _LIBGETTEXT_H
18
19 #include "tinygettext/tinygettext.hpp"
20
21 extern TinyGetText::DictionaryManager dictionary_manager;
22
23 static inline const char* _(const char* message)
24 {
25   return dictionary_manager.get_dictionary().translate(message);
26 }
27
28 static inline std::string _(const std::string& message)
29 {
30   return dictionary_manager.get_dictionary().translate(message);
31 }
32
33 static inline const char* N_(const char* id, const char* id2, int num)
34 {
35   return dictionary_manager.get_dictionary().translate(id, id2, num).c_str();
36 }
37
38 #endif /* _LIBGETTEXT_H */