⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (734 Bytes)
Bug #1492
» setLocale.cpp
Koen Deforche
, 10/23/2012 08:53 AM
#include
<Wt/WApplication>
#include
<Wt/WLabel>
#include
<Wt/WPushButton>
#include
<Wt/WContainerWidget>
#include
<Wt/WCheckBox>
#include
<iostream>
using
namespace
Wt
;
class
Test
:
public
WApplication
{
public:
Test
(
const
WEnvironment
&
env
)
:
WApplication
(
env
)
{
messageResourceBundle
().
use
(
"text"
);
Wt
::
WCheckBox
*
check
=
new
Wt
::
WCheckBox
(
WString
::
tr
(
"hello"
),
root
());
Wt
::
WPushButton
*
button
=
new
Wt
::
WPushButton
(
"Change"
,
root
());
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
);
}
« Previous
1
2
3
Next »
(1-1/3)
Loading...