[prev in list] [next in list] [prev in thread] [next in thread] 

List:       barracuda
Subject:    XMLC: Re: Barracuda: Question about XMLC and Localization
From:       Barracuda () enhydra ! org (Denny Chambers)
Date:       2001-01-17 15:30:48
[Download RAW message or body]

I am kinda of new to this list so I hope this is not too far off. This
is something that could be done in XMLC probably. I am suggesting this
from the point of view of having multiple *ML documents, one for each
language. Could you create a custom tag to put into your *ML documents
that would define what the local is. This tag could be used in:

A) Naming the Java Object representation of the *ML document.

	indexEnglish.class
	indexFrench.class

	If the locale was not found you could default to one.

B) The tag may also help your id naming problem

	<SPAN id=foo>foo</SPAN>
Once this tag was compiled in by XMLC it would become:
	fooEnglish=foo

Would this help out or is it crazy?

Richard Kunze wrote:
> 
> Barracuda@enhydra.org schrieb am 17.01.01:
> > Richard Kunze wrote:
> > > 
> > > Barracuda@enhydra.org schrieb am 17.01.01:
> > > > Hi Richard!
> > > > 
> > > > Richard Kunze wrote:
> > > > > How about this:
> > > > > 
> > > > > - Every individual chunk of text (Text node or attribute
> > > > > value e.g. for <img alt="">) is one i18n item
> > > > > - The key for each item is the item's value in the
> > > > > master template
> > > > > Pro:
> > > > > - no need to mark the text
> > > > > - avoids redundancy if you have the same text chunks
> > > > > appear more than once in a document.
> > > > > Con:
> > > > > - you can only have one translation per text chunk.
> > > > 
> > > > If you use localization macros instead of ids, e.g. (@macroKey@), the
> > > > con will go away?
> > > > Example:
> > > > 
> > > > <img alt="(@myMacro1@) (@myMacro2@)">
> > > 
> > > Yes, but that makes it quite difficult to work on the master template without \
> > > knowing what the macro values are.
> > 
> > Yes, that's the big drawback using macros.
> > 
> > > Right now, I'm thinking more along the lines of adding some kind of \
> > > autogenerated "serial number" to the key to disambiguate keys. E.g. for the *ML \
> > > snippet 
> > > <img alt="Some Picture"> <span>Some Picture</span>
> > > 
> > > the tool would automatically generate l10n keys "Some_Picture_0" und \
> > > "Some_Picture_1".
> > 
> > A really cool solution.
> > 
> > The only drawback I see with this approach is that the translation costs
> > would be much higher than working with macros. With your method the
> > translators will translate the exact same sentence over and over (and
> > they will do it happily, since they get paid for it ;-). With macros you
> > can use the same macro how many times you want. I think that makes
> > sense, since it's the exact same word/sentence that you want pasted in
> > at several places.
> 
> Yes and no. Mostly, you'd probably want only one key, but consider e.g. "Issue \
> number" which could mean both a trouble ticket ID ("issue" as in "bug") or an issue \
> of a periodical. Translated into german, you'd get "Fehlernummer" and "Ausgabe" \
> respctively, depending on context. 
> I'd guess (wild guess, I'm no linguist :-) that generating a single key would \
> probably work alright for longer phrases, but you'd like unique keys for short \
> phrases. The exact definition of "longer" and "short" is left as an exercise for \
> the reader ;-) 
> The best approach is probably if the tool can do both
> (unique and ambiguous keys, that is), and the user can
> decide on what to use by means of a config option.
> 
> > You can also introduce "global" macros that are used often (like
> > "glb_cancel", "glb_save", "glb_back", etc).
> > 
> > If it's possible to create l10n keys manually and somehow use those,
> > that would solve things. But I guess that defeats the purpose of your
> > method.
> 
> the nice thing with this approach is, if you use artificial
> l10n keys or not is completely transparent to the application: It simply uses every \
> contigouos text chunk that it finds in the master template as a key. You can even \
> mix explicit l10n keys and "plain text" keys in one template :-) 
> Richard
> 
> ______________________________________________________________________________
> Die Fachpresse ist sich einig: WEB.DE 16mal Testsieger! Kostenlos E-Mail,
> Fax, SMS, Verschlüsselung, POP3, WAP....testen Sie uns! http://freemail.web.de
> 
> -----------------------------------------------------------------------------
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe barracuda" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-barracuda@enhydra.org.

-- 
Denny Chambers
Linux Java Engineer
Connex, Inc
Voice: 770-455-7653
Fax: 770-455-7325
-----------------------------------------------------------------------------
To unsubscribe from this mailing list, send email to majordomo@enhydra.org
with the text "unsubscribe barracuda" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at owner-barracuda@enhydra.org.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic