Project

General

Profile

Bug #1494 ยป setLocale.cpp

Boris Nagaev, 10/23/2012 12:48 PM

 
#include <Wt/WApplication>
#include <Wt/WPushButton>
#include <Wt/WTextEdit>

using namespace Wt;

class Test : public WApplication
{
public:
Test(const WEnvironment& env)
: WApplication(env)
{
messageResourceBundle().use("text");

Wt::WPushButton *button = new Wt::WPushButton("Change", root());

Wt::WTextEdit *edit = new Wt::WTextEdit(root());
edit->resize(600, 300);

button->clicked().connect(this, &Test::change);
}

void change() {
setLocale("fr");
}
};

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

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

    (1-1/1)