Re: i18n
Emiliano <[email protected]> Tue, 8 Apr 2003 18:36:04 +0200
| Newsgroups | gmane.comp.java.xwt.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Apr 08, 2003 at 05:21:43PM +0100, Charles Goodwin wrote: > I used <template /> because I didn't have great success with xwt.static and > theming. I'm hoping xwt.overlay() will fix this. But this would mean the vars would most likely wind up duplicated in each template, yes? That could mean a substantial memory overhead. Right? Wrong? > > > <template> > > > <teststrings id="strings" /> > > > <testtemplate1 id="template1" /> > > > <testtemplate2 id="template2" /> > > > <testtemplate3 id="template3" /> > > > > > > $template1.font = $template2.font = $template3.font = > > > $teststrings.font; > > > > I still don't understand how $teststrings ends up pointing to > > com.emile.lang here. > > Oops, typo... s/\$teststrings/\$strings/ *ding*. I get it. The import makes "teststrings" 'local' of sorts; the template applies itself *automatically* (I missed that part -- so much more makes sense now), the vars are accessible, badaboom, badabing. > > <testtemplate1 id="template1" label="&xwt.property.foo.bar.stringz;"/> > > This could only work when referencing static stuff. You can't reference > non-static stuff as only static stuff is the same across different > instantiations. Yeah, but most of the user interface texts would be static. > If you have two buttons $button1 and $button2, does > xwt.property.button.activated come from $button1 or $button2? I figured that would just be <button id="button1" label="&xwt.property.etc.etc.button1;"/> etc. I know, it amounts to nearly the same amount of typing, I'm just looking at how XUL does it (sort of). The upside I see is that 'active' parts (code) are more clearly separated from 'passive' parts (frames and stuff). No biggie at all. > I think a refined version of what Adam suggested (which I based my example > on) is along the right lines. Of course, we should try to make it as easy > as possible, but I'm not sure of the feasibility of anything ohter than a > combination of 1) allowing <b p="x"> in tag references to xwt.static and 2) > xwt.theme and/or xwt.overlay actually working on xwt.static blocks. Hey, works for me. I was just freewheeling. Emile _______________________________________________ http://lists.xwt.org/listinfo/dev