subsurface/gettextfromc.h
Maximilian Güntner 17fbb6b17f Support translating UTF8 strings
Interpreting UTF8 encoded strings using tr() instead of trUtf8()
and encoding the string back to utf8 again leads to serious encoding
errors.

Fixes #230

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15 13:13:15 +09:00

18 lines
358 B
C++

#ifndef GETTEXTFROMC_H
#define GETTEXTFROMC_H
#include <QHash>
extern "C" const char *trGettext(const char *text);
class gettextFromC
{
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
public:
static gettextFromC *instance();
const char *trGettext(const char *text);
void reset(void);
QHash <QByteArray, QByteArray> translationCache;
};
#endif // GETTEXTFROMC_H