Project

General

Profile

Bug #1183 » t.cpp

Boris Nagaev, 03/11/2012 04:50 PM

 

#include <Wt/WApplication>
#include <Wt/WTemplate>

using namespace Wt;

class MyApp : public WApplication {
public:
MyApp(const WEnvironment& env):
WApplication(env) {
messageResourceBundle().use("qqq");
WTemplate* t = new WTemplate(WString::tr("qqq"), root());
t->addFunction("tr", &WTemplate::Functions::tr);
}
};

WApplication* createApplication(const WEnvironment& env) {
return new MyApp(env);
}

int main(int argc, char** argv) {
return WRun(argc, argv, &createApplication);
}


(1-1/3)