Re: Striping out html tags from translation string?

"Josef Albert Meile" <[email protected]>
Newsgroups gmane.comp.web.zope.internationalization
Message-ID <[email protected]>
>I think this is technically not possible. All apps I have seen leave the 
>markup in the translatable strings. Do you have any suggestions how to do 
>it?
Actually, I taugth it was possible. I saw the last example of this page:

http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZPTInternationalizationExamples

and that's what I understood. But after doing some test, I figured out that 
it is
impossible.

Anyway, responding to your question, I think one could use some kind of
regular expressions scanning, but it would include a low perfomance
effect. So, I think for this example is easier to pass the html tags. For 
more
complicated examples like the one named before, some kind of local
content like the one that localizer offers would do the trick.

>Clearly, just stripping does not work; you would need placeholders for it; 
>But then the translator sees this markup. What is better: a Zope-specific 
>markup or standard HTML tags?
Yeah, you are right, the thing is that one could stip the html tags, send it
to the translation service, but the returned translated string won't have 
the
html format.

>For more complex cases I would play around with i18n:name till you find a 
>satisfactory splitup of the translation.
Yes, that's why I've done till now.

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.