From: "Tomasz Wegrzanowski"
On Mon, Mar 01, 2004 at 03:15:05PM +0900, Guillaume
Blanchard wrote:
> Can we have a per-language post-parser to be able to make language
specific
> modification on text before rendering?
>
> For example, in French typography, we need to put non-breaking space
before
> characters ':', ';', '»',
'!', '?', after '«' and between numbers
hundreds.
>
> Actually, we do that with HTML code but it make text sometime
very
> ugly.
>
> For exemple :
>
> Il dit : « Bonjour ! »
>
> Is actually write :
>
> Il dit : « Bonjour ! »
>
> I don't know if non-breaking space is used in other language typography?
>
> An other solution may be to use a WikiSyntax for non-breaking space.
>
> For example _ or __ to be convert to
>
> The text above may become:
>
> Il dit_: «_Bonjour !_»
>
> Personally I prefer automatic conversion, and if you can make a hook
after
> the WikiSyntax parse, I can do the PHP function
that add non-breaking
space
where they
must be.
The idea sounds great, but it's very difficult to do right.
Not everything on X Wikipedia is in language X - you have things in other
languages,
computer code, etc.
I think it would be nice to convert -- to real dash and _ to , but
only
if we can find good way for writing actual
"--" and "_" when we want (and
not only inside <pre> and <nowiki>). TeX-style \_ would be absolutely the
worst
solution, and HTML-style &under; wouldn't be
much better.
In my point of view, meta tag must be separate to the article text.
Convert '_' to is the simpler way, but I don't see any solution to
solve the problem if this character is used in articles (I never see it in
French article).
What about a post-parse function you may add in default language.php and
that each language may derive to make language specific modification. For
French, it may be very basic function: replace ' !' by ' !' and
so on.
In fact, use '_' in instead of may make article more legible, but the
problem is people may often forgot to put '_' in right place.
Aoineko
----
Render test
Actually:
Il dit : « Bonjour ! »
With '_' convert to
Il dit_: «_Bonjour_!_»
With post-parse process:
Il dit : « Bonjour ! »