mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
20 lines
373 B
C++
20 lines
373 B
C++
|
#include <QCoreApplication>
|
||
|
#include <QString>
|
||
|
#include <gettextfromc.h>
|
||
|
|
||
|
char *gettextFromC::gettext(const char *text)
|
||
|
{
|
||
|
return 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);
|
||
|
}
|