You mean for tag text, correct? <span wicket:message="hello.message" />
What do you think about <wicket:message key=".."/>. Than it is clear that the whole label is wicket specific, <span wicket:message="key"> is a bit dangerous because how would we handle <span wicket:id="myLabel" wicket:message="key">? Juergen On 11/9/05, Dorel Vaida <[EMAIL PROTECTED]> wrote: > Juergen Donnerstag wrote: > > >I'm all for making things easier for the user. > > > > > > > >>Perhaps Wicket could have something like this: > >><span wicket:id="message:myLabelHere"></span> > >> > >> > > > >I'm not sure this makes sense. wicket:id is not a text to be displayed > >anywhere. It is a name which identifies a component. It definitely > >won't work. > > > > > Actually, maybe this is not the solution but a way to specify i18n > message keys directly in the html through a wicket tag would be VERY > handy. Now, in a project I'm working on, for a i18n input form, half of > the form elements are i18n labels that I add to the form in java code. > Instead of add(new I18nLabel("lbl", "hello.mesage")) and <span > wicket:id="lbl" /> it would be more handy to have 'something like' <span > wicket:message="hello.message" ></span> or <wicket:message > key="hello.message" />, w/o poluting java code with i18n keys if it's > not necessary (like when you need to compose complex i18n messages > which would be done from the code). > > Just a thought :-) (or maybe I am too intoxicated with > Struts/Webwork/SpringMVC :-D. I am trying to get rid of it you know.) > > > > > > >>Even better would be that it would recognize the message:label anywhere in > >>the HTML. So for example, you could have: > >><input type="submit" value="message:label.submit" /> > >> > >> > > > >That I think is possible. Acutally you can do it today already without > >any changes to the core. You need to develop a IMarkupFilter and > >append it to the list of existing ones invoked by MarkupFilter. > > > >However you won't be able to handle "message: ...." within a tag body; > >only tag attributes. How does Tapestry do it for body text? > > > >An other option would be to run a kind of text based (not xml based) > >pre-processor (like we do merging of inherited markup) prior to adding > >the markup to the cache. > > > >How likely is it that you'll find "message:" and it is not intended to > >be a i18n text? How to escape it? > > > >Lets say your message must contain a reference some other data, e.g. > >"...${price}...". That won't be possible either. Only simple text. As > >AttributeModifier is already able to handle it, "message:.." would be > >for easy and straight forward replacements only, and AttributeModifer > >to cover everything else. > > > >Ah, and of course you loose preview capabilities, as the designer > >won't the real message, he'd see "message:..." only. > > > >And it might not the perfekt solution for high-speed up, because of > >the (little) performance penalties involved. For high-speed up you can > >still have myPage_en.html; myPage_nl.html etc may which as well cover > >minor changes in the layout due to labels being of differents length; > >right-to-left languages etc. > > > >Juergen > > > >On 11/8/05, Andrew Berman <[EMAIL PROTECTED]> wrote: > > > > > >>In my app I never hard-code text so I'm constantly adding Labels to my > >>pages. I was wondering if it would make sense to have a shortcut, similar > >>to how Tapestry does it, for dsplaying localization messages. In Tapestry, > >>you can do this: title="message:page-title", where page-title is the lookup > >>into the property file. > >> > >>Perhaps Wicket could have something like this: > >><span wicket:id="message:myLabelHere"></span> > >> > >>Even better would be that it would recognize the message:label anywhere in > >>the HTML. So for example, you could have: > >><input type="submit" value="message:label.submit" /> > >> > >>Thoughts? > >> > >>--Andrew > >> > >> > >> > > > > > >------------------------------------------------------- > >SF.Net email is sponsored by: > >Tame your development challenges with Apache's Geronimo App Server. Download > >it for free - -and be entered to win a 42" plasma tv or your very own > >Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > >_______________________________________________ > >Wicket-user mailing list > >Wicket-user@lists.sourceforge.net > >https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user