Re: Localization Structure Model



On Wed, Nov 15, 2000 at 10:56:43PM -0600, Steve Fox wrote:
> Joakim Ziegler wrote:

>> Now, localizing appindex entries is a separate issue, but for localizing
>> general page content, the best thing to do if we're using PHP is probably
>> defining some functions like l10n_text_start(language) and
>> l10n_text_end(), and put blocks of text between pairs of these functions.
>> It's then really easy to pick the right one, since l10n_text_start just
>> checks if language is the same as the current language, and if not,
>> suppresses the output.
 
> I like the idea of function usage. So they would grab the page text from
> a file? Would we use XML?

In the simplest form, the file would look something like this:

<? l10n_text_start("english"); ?>
A rose is a rose is a rose.
<? l10n_text_end();

l10n_text_start("latin"); ?>
Rosa rosa rosa est est.
<? l10n_text_end(); ?>

I all places where you'd want to put text blocks. This is probably not the
*best* way of doing it, but it's a decent example of how simply it can be
done. I'll leave it as an exercise for the reader to figure out what
l10n_text_start() and l10n_text_end() look like.

Please consider this a counterpoint to the "Everything in an SQL database"
school of thought, not a proposal for an actual implementation.

-- 
Joakim Ziegler - Helix Code web monkey - joakim helixcode com - Radagast IRC
      FIX sysop - free software coder - FIDEL & Conglomerate developer
            http://www.avmaria.com/ - http://www.helixcode.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]