blob: fe6263a4bf26b0b8d08ca515926c5e7ea46f0507 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <QCoreApplication>
#include <QString>
#include <gettextfromc.h>
char *gettextFromC::gettext(const char *text)
{
return strdup(tr(text).toLocal8Bit().data());
}
gettextFromC* gettextFromC::instance()
{
static gettextFromC *self = new gettextFromC();
return self;
}
extern "C" const char *gettext(const char *text)
{
return gettextFromC::instance()->gettext(text);
}
|