In article <[EMAIL PROTECTED]>, R. Joseph Newton wrote:
> Kevin Pfeiffer wrote:
>
>> I thought the easy way to do this is to first assign my entire 'en' data
>> structure to the 'de' structure and then add 'de' values as available.
>>
>> So I did this:
>>
>> $text{'main'}{'de'} = $text{'main'}{'en'};
>>
>> $text{'main'}{'de'} = { # German labels
>> 'alias_sub' => "ALIAS",
>> 'user_sub' => "BENUTZER",
>> };
>>
>> But this assignment doesn't seem to work. Can I not do this?
>
> I bet it does. Just not the way you want it to.
[...]
I'll have to maybe try a smaller sample and then look at them with
Data::Dumper (I'm a little slow sometimes)
> *Hash-based structures do not have columns or support parallelism*
Writing it on the wall! ;-)
>
> I'd suggest a little restructuring:
>
> $text{'main'} = {
> 'alias_sub' => {'en' => 'Alias', 'de' => 'Allas'},
> 'user_sub' => {'en' => 'User', 'de' => 'Benutzer'},
> ...
> }
Too late for me, and I wanted something where someone could say, okay, now
lets add Bulgarian. So I keep each language separate.
> A little less elegant when it comes to accessing it, but if you see the
> potential for forgetting the German counterparts as serious, this would
> make it much less likely.
I think the better approach for me is that when my get_lang routine is
called to provide language for a prompt that if, for example,
$text{main}{de}{alias_sub} does not exist, that the other entry is
substituted. I think I can figure that out...
Thanks for the help and advice!
--
Kevin Pfeiffer
International University Bremen
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]