a customer of mine wanted all normal "quotes" shown as »french« quotes. There are many quotes in the site!
So i wrote a small hack to replace all quotes with the french or the german version. Maybe this is usefull.
The french version:
Code: Select all
<?php
// ==========================================================
// Replace normal quotes with »french« quotes (V 1.0)
// Klaus Winkler alias [Cipolla] http://www.empics24.de
// Create a file like "french_quotes.php" with this script and put it in the
// frontend_render folder
// ==========================================================
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Replace left quotes after a ending tag
$content["all"] = str_replace('>"','>»', $content["all"]);
// Replace left quotes inside text
$content["all"] = str_replace(' "',' »', $content["all"]);
// Replace right quotes before new tag
$content["all"] = str_replace('"<','«<', $content["all"]);
// Replace right quotes inside text
$content["all"] = str_replace('" ','« ', $content["all"]);
?>
Code: Select all
<?php
// ==========================================================
// Replace normal quotes with „german“ quotes (V 1.0)
// Klaus Winkler alias [Cipolla] http://www.empics24.de
// Create a file like "german_quotes.php" with this script and put it in the
// frontend_render folder
// ==========================================================
// ----------------------------------------------------------------
// obligate check for phpwcms constants
if (!defined('PHPWCMS_ROOT')) {
die("You Cannot Access This Script Directly, Have a Nice Day.");
}
// ----------------------------------------------------------------
// Replace left quotes after a ending tag
$content["all"] = str_replace('>"','>„', $content["all"]);
// Replace left quotes inside text
$content["all"] = str_replace(' "',' „', $content["all"]);
// Replace right quotes before new tag
$content["all"] = str_replace('"<','“<', $content["all"]);
// Replace right quotes inside text
$content["all"] = str_replace('" ','“ ', $content["all"]);
?>