Ferenc Engard <[EMAIL PROTECTED]> Forwarded From: 

> Alan Knowles wrote:
> > > > At present the nadmin translator module will
> > > > read styles and create translated styles based on parsing an original style 
>called ..._eng
> [...]
> > Pretty much spot on..
> > 
> > At present it doesnt work out what has been changed and only update those - it 
>does a full 'remake' of all the elements when prompted.
> > 
> > stage 1 the parser
> > - reads all the 'text' from the original html pages
> 
> 'text'? What does it mean? I have waded through the
> tool_translator/htmlparser snippet, and now I have an idea. So, it
> collects all the textual data (one block is specified as 'character
> data' in XML notation, e.g. text between a start-tag and end-tag). I
> suppose that when generates the translated text, it copies all the
> special notations (such as &nbsp; etc.) from the source, yes? I don't
> exactly understand what it does with { ... } text. I suppose that I have
> to translate 

Yes, it reads gets everything between <sometag>translateable text</endtag>
and also value="translateable text" for 'input tags'
if the text is only &nbsp; or just {xxxx} it will ignore it - as {xxx} is the fast 
template variable tag.
> 
> > - stores it in the database using md5sums of the strings.
> 
> What is it good for? To indentify the changed content?

We found that it was the most reliable way to store the text and reference it again , 
alot of the time "xxxx" = " xxxx" failed so it got very confused - this method means 
that although this test would fail, the 'suggestions' would pick it up.


> > stage 2 the input system
> > the interface does a look up on similar words already translations and uses these 
>for suggestions
> > Attempts to summarize the number of missing words..
> > 
> > stage 3 reparse and update
> > re reads the original translations and creates or updates the translated template 
>based on the results of the first one.
> > 
> > stage 4 import/export
> > saves each database entry in a serialize format (not 100% reliable but not too bad)
> 
> So, there is no special notation for a string that means 'hey! translate
> me!'. Anyway, it looks good. 2 questions just to be sure that I
> understand: 1. If I delete a paragraph, I don't have to do anything
> except run stage 3 to update all the other language sites, yes?

exactly

 2. If I

> have a 2-page length text with a <B>blahblah</B> in the middle, then I
> have to translate 3 entries: a long one, 'blahblah', and another long
> one?

yes

> 
> Ok, I think I have the picture. A few more questions: how can I put my
> style (or page) tree into the translation process?

use the name "stylename_eng" = the _eng is what it should be looking for.

 And how can I put
> content only to one of the translated style that it won't disappear at
> the next translated template update? (E.g., special info only to the
> germans?) Maybe check the language in PHP and write out the text...?

at present the best I can think of for this!
<? // in code-init? or global-init?
$uselanguage = $HTTP_ACCEPT_LANGUAGE;
// use http://myadminsite.com/nadmin/info 
// to see what this value could be from your browser.
if ($mycookie[uselanguage]) $uselanguage = $mycookie[uselanguage];
?>

<? if ($uselanguage) == "en") { ?>english<? }
<? if ($uselanguage) == "german") { ?>Ich bin ein berliner...<? }

the translator will pick up both, Im not sure there is any logic that would be valid 
to pick up this condition (open to ideas though)

regards

alan



> 
> Bye:
> Ferenc
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to