82inline std::string
fmtgettext(
const char *format, Args&&... args)
85 std::size_t buf_size = 256;
88 format = gettext(format);
91 if (len <= 0)
throw std::runtime_error(
"gettext format error: " + std::string(format));
92 if ((
size_t)len >= buf.size()) {
void init_gettext(const char *path, const std::string &configured_language, int argc, char *argv[])
Definition gettext.cpp:150
std::wstring wstrgettext(const char *str)
Definition gettext.h:46
std::string fmtgettext(const char *format, Args &&... args)
Returns translated string with format args applied.
Definition gettext.h:82
std::wstring fwgettext(const char *src, Args &&... args)
Returns translated string with format args applied.
Definition gettext.h:65
std::string strgettext(const char *str)
Definition gettext.h:35
int mt_snprintf(char *buf, const size_t buf_size, const char *fmt,...)
Definition porting.cpp:841