Posts tagged Just testing

Das Gengo-Plugin für WordPress behauptet mehrsprachiges Bloggen zu unterstützen, was ich mit diesen vollends inhaltsleeren Post ausprobieren werde. In English und Deutsch. Wahnsinn.

The Gengo-plugin for wordpress claims to support multilingual blogging, so I’ll give it a try with this utterly contentless post (which exists in english and german). Let’s see what happens!

5 Minutes later… There is no way to switch the current language in any human-compliant way. Gengo does come with two widgets, one displaying just a static list of available languages (wow.) and the other is supposed to (judging by the name) switch the displayed language, but due to major bugs in the JavaScript, it never works. And of course there is no fall-back to something non-scripty.

So I’ll keep up with my way of tagging the posts with their language code and some not very sophisticated magic in my custom theme to display some German messages, where appropriate.

On the non-fail side: another plugin/widget puts my currently listened-to albums somewhere (with JavaScript look at the top edge of the screen, without look at the bottom of the page). Yes, it’s really useless but I swear there won’t be anything like the mood-descriptions or lolcats. Ever.

After my most miraculous recent success of embedding MathML despite Wordpress’ continued effort to destroy anything I feed into it, I got a little carried away and tried it with SVG:

Yeah, XHTML! 1 + x + x

As the Firefox-Developers re-enabled foreignObject in the current builds, above image uses the technique to embed MathML, which in turn embeds XHTML (the link) and another SVG image (the hand-drawn text). And it works! — at least it does in Firefox 3, but who cares about the others anyway?

…sehen wir doch mal nach, ob MathML mittlerweile wieder funktioniert:

- x ϕ t t = Φ x


Ergebnis: Gar nichts? Liegt es am Content-Type: text/html? Denn andere Dokumente werden angezeigt.

Mysteriös! Damit ist aber schonmal keine Langeweile für die nächsten Minuten (Stunden? Tage?) angesagt. Immerhin.


Merke: Content-Type matters!. Falls es jemanden interessieren sollte: In der Wordpress-Templatedatei header.php einfach folgenden Code am Anfang der Datei einfügen:

<?php
  header( 'Vary: Accept' );
  if( stristr( $_SERVER["HTTP_ACCEPT"], "application/xhtml+xml" ) )
    header('Content-Type: application/xhtml+xml; charset=UTF-8' );
?>

Natürlich lässt sich das noch erweitern, sodass die richtigen Doctypes geliefert werden, um die Browser in den Standards Compliance Mode zu schalten… Das Ganze hat auch zur Folge, dass Gecko jetzt seinen XML-Parser (statt des HTML-Tag-Soup-Ratevehikels) verwendet und sofort meckert. Mal sehen wie schlimm Wordpress den Inhalt verwurstet (die Correct incorrectly nested XHTML-Funktion habe ich schon hassen gelernt)…


Und was sagen denn die anderen ernstzunehmenden Browser eigentlich dazu?

Opera
kennt plötzlich die HTML-Entities nicht mehr, scheinbar weil sich ihr XML-Parser nicht um den Doctype schert. Nicht mein Problem, sieht ein bisschen blöd aus.
Webkit
(in meinem Fall Midori, nicht aktuell) bastelt eine Fehlermeldung in die Seite hinen, weil es offenbar ebenfalls den Doctype nicht liest, behauptet, es würde up to the first error rendern, stellt dann aber doch alles andere dar, auch normale HTML-Entities.

Stellt sich natürlich die Frage, weshalb die beiden eigentlich den Accept: application/xhtml+xml-Header senden, wenn sie nichtmal einen richtigen XML-Parser besitzen.


Oh, und wenn obige Formel in Firefox hässlich aussieht sind wahrscheinlich die eingestellten Schriftarten daran Schuld (insbesondere wenn man die offizielle Anleitung befolgt). Setzt man, z.B. per about:config die Eigenschaft font.mathfont-family auf STIXNonUnicode, STIXSize1, STIXGeneral, Cambria Math, Standard Symbols L, DejaVu Sans, wird es doch ganz nett.

I hate PHP.

And MySQL.

And most of the people using it.

This blog runs WordPress. And it’s quite a pain.

But until the revolution comes (which will be, according to my latest plans due in ca. 14 months), this will be it. My eyes hurt, I hope it’s that Web2.0-feeling inside me…