i18n.h

00001 /*
00002  * i18n.h
00003  * This file is part of dbPager Classes Library (DCL)
00004  *
00005  * Copyright (c) 2009 Dennis Prochko <wolfsoft@mail.ru>
00006  *
00007  * DCL is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation version 3.
00010  *
00011  * DCL is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with DCL; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor,
00019  * Boston, MA  02110-1301  USA
00020  */
00021 
00022 #ifndef _I18N_H_
00023 #define _I18N_H_
00024 
00025 #include <string>
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #include "config.h"
00029 #endif
00030 
00031 namespace dbp {
00032 
00034 #define _(str) std::string(dbp::i18n::translate(PACKAGE, str))
00035 
00037 
00043 class i18n {
00044 public:
00046 
00050         static void register_catalog(const std::string &catalog);
00052 
00057         static void register_catalog_at(const std::string &catalog,
00058           const std::string &path);
00060 
00066         static std::string translate(const std::string &catalog,
00067           const std::string &str);
00068 };
00069 
00070 } // namespace
00071 
00072 #endif /*_I18N_H_*/
00073 

 
Support This Project
SourceForge.net Logo