Re: i18n

Emiliano <[email protected]> Wed, 9 Apr 2003 10:56:57 +0200
Newsgroups gmane.comp.java.xwt.general
Message-ID <[email protected]>
On Wed, Apr 09, 2003 at 09:32:49AM +0100, Charles Goodwin wrote:

> > 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?
> 
> Wrong, because rather than using static, we're exporting it to a separate
> template that you only instantiate once.

Ah, hmm... that would mean one template per translation block. That would work.

> <xwt>
>     <static>
>         var somevarx = "somestring";
>     </static>
> 
>     <template>
>         var varx = xwt.static.path.to.this.template.somevarx;
>     </template>
> </xwt>

The reference says

  Note that theme mappings and import lists are not  consulted when
  accessing static data via xwt.static'

so I expect I couldn't use this trick for language themeing. OTOH, I
might just ship separate xwars for each lang anyhow; I have a
thread-timing issue with getting the desired locale from xwt.origin
before the scripts that apply the translation start running. Shipping
multiple xwars is unfortunate, but it works.

> > *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.
> 
> Yeah, along those lines.

What, no badaboom, badabing? Disappointed.

Emile

_______________________________________________
http://lists.xwt.org/listinfo/dev