Files

35 lines
1.4 KiB
C++

/*
* WiVRn VR streaming
* Copyright (C) 2024 Guillaume Meunier <[email protected]>
* Copyright (C) 2024 Patrick Nicolas <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <boost/locale/gnu_gettext.hpp>
#define _(x) boost::locale::gettext(x)
#define _F(x) fmt::runtime(boost::locale::gettext(x))
#define _cF(c, x) fmt::runtime(boost::locale::pgettext(c, x))
#define _S(x) boost::locale::gettext(x).c_str()
#define _C(c, x) boost::locale::pgettext(c, x)
#define _cS(c, x) _C(c, x).c_str()
#define gettext_noop(x) x
#define gettext_noop_context(c, x) x
std::vector<boost::locale::gnu_gettext::messages_info> get_locales();
std::vector<char> open_locale_file(const std::string & file_name, const std::string & encoding);