Re: Question about localization
igor.vaynberg wrote: application.init() { getresourcesettings().setlocalizer(...); } you dont have to use the default resource model, just write your own if you dont like the default one. -igor Thank you, it works fine ;) But I have another problem. I sometimes use wicket:message key=foo as a shortcut for inserting text. Is it possible to automatically append some text to the key value? (I need to transform it to style1.foo) Thank you -- View this message in context: http://www.nabble.com/Question-about-localization-tf4756837.html#a13648232 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about localization
write your own wicket:message like tag? -igor On 11/8/07, Pills [EMAIL PROTECTED] wrote: igor.vaynberg wrote: application.init() { getresourcesettings().setlocalizer(...); } you dont have to use the default resource model, just write your own if you dont like the default one. -igor Thank you, it works fine ;) But I have another problem. I sometimes use wicket:message key=foo as a shortcut for inserting text. Is it possible to automatically append some text to the key value? (I need to transform it to style1.foo) Thank you -- View this message in context: http://www.nabble.com/Question-about-localization-tf4756837.html#a13648232 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about localization
Yes, I'll make it part of the key. I searched but not found, how can I change the default localizer and the default resourcemodel? There is no method setLocalizer/setResourceModel in class WebApplication... Thank you for your help. igor.vaynberg wrote: you can override methods in localizer to bend it to your will, but like i said beware if you do not expect to make style part of the key -igor -- View this message in context: http://www.nabble.com/Question-about-localization-tf4756837.html#a13623105 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about localization
application.init() { getresourcesettings().setlocalizer(...); } you dont have to use the default resource model, just write your own if you dont like the default one. -igor On 11/7/07, Pills [EMAIL PROTECTED] wrote: Yes, I'll make it part of the key. I searched but not found, how can I change the default localizer and the default resourcemodel? There is no method setLocalizer/setResourceModel in class WebApplication... Thank you for your help. igor.vaynberg wrote: you can override methods in localizer to bend it to your will, but like i said beware if you do not expect to make style part of the key -igor -- View this message in context: http://www.nabble.com/Question-about-localization-tf4756837.html#a13623105 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question about localization
Hello everybody, I have a question about the localization in Wicket 1.3 beta 4. I have to handle different files for the same language and the same component. In example, I have a home page in english who says Hello dude! (this string is stored in a *.properties file). And I need a second *.properties who store Good morning mister!, and a way for switching them. I've planned to put this ressource files into separate folder, like this: /src /my/package/MyComponent.java /my/package/MyComponent.html /my/package/MyComponent.properties // store defaults values /properties /style1 MyComponent.properties // store Hello dude! /style2 MyComponent.properties // store Good morning Mister! Is it possible? And how can I do that? Thank you very much! S. Piller - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about localization
i wouldnt use wicket's localization support for this. you can always implement your own IStringResourceLoader, but the problem with that is that wicket caches the lookup by default so you wouldnt be able to switch. now what you CAN do is write your own resourcemodel that would append the style to the key, if you have style1.message and style2.message properties defined then you wont have a problem and your StyledResourceModel can simply append style1. or style2. to your message lookups. -igor On 11/6/07, Piller Sébastien [EMAIL PROTECTED] wrote: Hello everybody, I have a question about the localization in Wicket 1.3 beta 4. I have to handle different files for the same language and the same component. In example, I have a home page in english who says Hello dude! (this string is stored in a *.properties file). And I need a second *.properties who store Good morning mister!, and a way for switching them. I've planned to put this ressource files into separate folder, like this: /src /my/package/MyComponent.java /my/package/MyComponent.html /my/package/MyComponent.properties // store defaults values /properties /style1 MyComponent.properties // store Hello dude! /style2 MyComponent.properties // store Good morning Mister! Is it possible? And how can I do that? Thank you very much! S. Piller - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about localization
igor.vaynberg wrote: now what you CAN do is write your own resourcemodel -igor Is it possible to place style1 and style2 strings in separate files? I mean, is it possible to force the resource localizer to look up into several files for style1.foo or style2.foo? Thank you for your help ;) -- View this message in context: http://www.nabble.com/Question-about-localization-tf4756837.html#a13615397 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]