Re: [Cppcms-users] cppcms::form and translate()
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-09-14 09:06:57
|
>Hi all > >I am looking for a way to translate select box values: > > struct touch_form : public cppcms::form { > cppcms::widgets::select hide_mouse; > > touch_form() > { > hide_mouse.add(translate("YES"), "true"); <<----- Yes this is the correct way to translate... just small note you need either hide_mouse.add(booster::locale::translate("YES"), "true"); or using booster::locale::translate; hide_mouse.add(translate("YES"), "true"); > hide_mouse.add("NO", "false"); > > add(hide_mouse); > } > }; > >In the template I have the following: > <label for="touch_hide"><% gt "Hide Mouse Cursor" %>:</label> > <% form block form.hide_mouse %> id="touch_hide" <% end %> > >How can I do this? Yes this is the way to do this. Just like there: http://cppcms.com/cppcms_ref/latest/ex_message_board____apps_forums__cpp.html You are doing it right > >thanks >--- >Christian Gmeiner, MSc > >------------------------------------------------------------------------------ >Got visibility? >Most devs has no idea what their production app looks like. >Find out how fast your code is with AppDynamics Lite. >http://ad.doubleclick.net/clk;262219671;13503038;y? >http://info.appdynamics.com/FreeJavaPerformanceDownload.html >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |