cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <>
Subject Re: Internationalization
Date Sat, 09 Dec 2000 22:00:49 GMT
Hi Conny

Could you please post the proposal to this list, too.



Conny Krappatsch wrote:
> Hello,
> we are about to develop some internationalization 'tool' for cocoon.
> You can take this mail as a proposal and every comment is very welcome.
> With internationalization I meen marking character data in an XML file for
> translation into different languages.
> The requirements are:
> 1. a very short syntax: internationalization shouldn't require much additional
> writing (the translation itself requires some additional work, of course).
> 2. Flexible handling of dynamicly generated content: Replacing a static text
> by a corresponding translated text is easy. But if the text contains dynamic
> content, that content may have different order in different languages (example
> below).
> 3. Support multiple languages by some sort of runtime passed parameter
> The markup could look like the following:
> <tr>this text will be translated</tr>
> [<tr> stands for 'translate'; I ommitted any namespace info]
> The text between the <tr> tags will be taken as key in a translation table.
> For a given number of documents the keys of this table can be created
> automatically by searching the documents for the <tr> tags.
> Some character data may contain dynamically created content which itself can
> have different order (within the localized text) in different languages. Here's
> an example (dynamic content in curly brackets}:
> In english one would say: We are a {team} of {4}.
> In german you say: Wir sind ein {4}er-{team}.
> [It's a silly example, I know. Everyone understanding what I mean, is free to
> provide a better one.]
> The example shows, that we need some sort of parameters:
> <tr>
>     <text>We are a $1 of $2.</text>
>     <param>dynamic_content_generation_for_the_first_parameter</param>
>     <param>dynamic_content_generation_for_the_second_parameter</param>
> </tr>
> The characters between <text> tags are the key in the translation table. The
> replacement text must contain the same number of parameter references ($1, $2)
> like the key, but the order of the references can be different (i.e. $2 before
> $1).
> So the internationalization tool has to perform the following actions (for a
> given XML document):
> 1. Find the tags belonging to it's grammar (using namespaces)
> 2. Determine the target language
> 3. Find the given key in the translation table and replace it with the
> appropriate target language text.
> 4. replace parameter references with the given parameter values.
> Our intention is to write a processor (resp. a transformer for C2) which does
> the job.
> The target language could be passed by parameter to the processor/transformer.
> Does this sound reasonable? Did we overlook something? Or is anybody doing
> something similar (maybe with a different approach)?
> regards,
> Conny
> (I'm not native english speaker. If something sounds odd, don't hesitate to
> correct me.)
> --
> ______________________________________________________________________
> Conny Krappatsch                    
> SMB GmbH                              

View raw message