One idea is to use the __DATA__ block to store texts
Why go through the process of having to convert text to a hash at runtime, everytime; and load all languages for every run.
text.EN
( "...", # 0 "...", # 1 ... );
And then you can do:
my $lang = determineLang(); my @text = do "$lang.pl"; ... print $text[ 27 ];
use Storable [thaw]; ... my $lang = determineLang(); my $text = thaw( "$lang.sto" ); ... print $text->[ 27 ];
You would use a separate small app to build and write the binary storable files.
In reply to Re: Text storage/retrieval
by BrowserUk
in thread Text storage/retrieval
by DreamT
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |