Automatische Sprachauswahl in TXP per Browser-'Antwort' - Multi-lingual articles in Textpattern: A poor man’s solution · Textpattern · a waste of words

· Ressort: sammlung · Kategorie:
Webseiten thumbnail

(Textpatern) Eine anderssprachige Seite ausliefern, je nach dem was im Browser eingestellt ist: "As it goes for multi-lingual Textpattern powered sites, a full-fledged solution like Textpattern MLP supports a truly babylonian site architecture, from articles straight through to section names and random text snippets. Sometimes this is just too much. I, for instance, had to fulfill an occasional need for a both German and English representation of the same content as I did a short writeup ... The idea is to put all localized renditions of a text into just one article and let Textpattern conditionally render either one or the other part of it, depending on the user-agent’s Accept-Language preference. All sample code below assumes Textpattern 4.0.7, as it makes use of the new <txp:variable /> tag."

Link zur besprochenen Seite

27. September 2008 | Markus Merz