[EMAIL PROTECTED] wrote:
>Where is this language value coming from? The widget's container. You only
care about English? Then set it to "EN-US" and forget it.
[snip]
>Implementation strategies can be as simple as:
>
>
>sub label {
>
> my $self=shift;
> my $lang=shift || $self->container->language;
>
> if (exists $self->{'label'}{$lang}) {
> return $self->{'label'}{$lang};
> }
> return $self->{'label'}{$self->container->language('default');
>
>}
Something I've seen elsewhere is to have a master table of strings that the
widgets can then reference.
Different ways of doing this:
index strings by number (MicroSoft resources in executables);
index strings by the string in a particular language (TWIG with English as
the indexing language).
This allows for sharing of strings across widgets and memory savings, always a
good thing in mod_perl. It also doesn't slow the system down much if any
compared to storing the strings in each widget with duplication.
--
James Smith <[EMAIL PROTECTED]>, 979-862-3725
Texas A&M CIS Operating Systems Group, Unix
- Re: Real Widgets and Template Languages Robert Landrum
- Re: Real Widgets and Template Languages Stephen Adkins
- Re: Real Widgets and Template Languages Matt Sergeant
- Re: Real Widgets and Template Languages James G Smith
- Re: Real Widgets and Template Languages Gunther Birznieks
- Re: Real Widgets and Template Languages Stephen Adkins
- Re: Real Widgets and Template Languages James G Smith
- Re: Real Widgets and Template Languages jay
- Re: Real Widgets and Template Languages jay
- Re: Real Widgets and Template Languages James G Smith
- Re: Real Widgets and Template Languages Jay Lawrence
- Re: Real Widgets and Template Languages Stephen Adkins
- Re: Real Widgets and Template Languages Issac Goldstand
- Re: Real Widgets and Template Languages Stephen Adkins
- Re: Real Widgets and Template Languages - MOVING TH... Jay Lawrence
- Re: Real Widgets and Template Languages Gunther Birznieks
- Re: Real Widgets and Template Languages Gunther Birznieks
- Re: Real Widgets and Template Languages Gunther Birznieks
- Re: Real Widgets and Template Languages Gunther Birznieks
- Re: Real Widgets and Template Languages brian moseley
