logo
WSN Links PHP Directory Software
Features Showcase Reviews Demos Purchase Manual Support
 

howto using german umlaute and rewrite

Version: 4.1.26


howto using german umlaute and rewrite
frankbeckers
Experienced

Usergroup: Customer
Joined: Dec 20, 2007
Location: Germany
Total Topics: 19
Total Posts: 52
Posted 01/20/08 - 08:33 AM:
quote post
#1
Hi,

is there any howto available for using german umlaute (äöüÄÖÜß) and mod_rewrite? I want to use this kind of character in some category name.

Example: Schüßler will be rewrite'd to Schusler, which is for searchengines not the same. It is totally another word. A circumvention will be Schuessler.

Is there any help available?

Regards,
Frank

_____________________
Naturheilkunde und Alternativmedizin - Das Portal für Ihre Gesundheit
Kochen Verzeichnis - Alles zum genießen, schlemmen und naschen
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 49
Total Posts: 5539
Posted 01/21/08 - 04:06 AM:
quote post
#2
You can choose what to replace accents with using the $accenttweak tweak: http://scripts.webmastersite.net/wsnlinks/wsnmanu...
frankbeckers
Experienced

Usergroup: Customer
Joined: Dec 20, 2007
Location: Germany
Total Topics: 19
Total Posts: 52
Posted 01/21/08 - 11:36 AM:
quote post
#3
I have read the manual, but I have not understood it.

$accenttweak['from'] = ''; // for url rewriting, accented characters to replace
$accenttweak['to'] = ''; // for url rewriting, replacements for accented characters

and the coding is like this

if (isset($accenttweak)) $string = str_replace(str_split($accenttweak['from']), str_split($accenttweak['to']), $string);


What I have to do, when I want to translate all together?

ä to ae
ü to ue
ö to oe
ß to ss
Ä to Ae
Ü to Ue
Ö to Oe

_____________________
Naturheilkunde und Alternativmedizin - Das Portal für Ihre Gesundheit
Kochen Verzeichnis - Alles zum genießen, schlemmen und naschen
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 49
Total Posts: 5539
Posted 01/22/08 - 05:50 PM:
quote post
#4
It doesn't handle non-1-to-1 correspondence, so it can't do that.
frankbeckers
Experienced

Usergroup: Customer
Joined: Dec 20, 2007
Location: Germany
Total Topics: 19
Total Posts: 52
Posted 01/22/08 - 09:52 PM:
quote post
#5
whats about an extension/correction to tweak_vars like this

...
$accenttweak_from=array('Ä','ä','Ö','ö','Ü','ü','ß');
$accenttweak_to=array('Ae','ae','Oe','oe','Ue','ue','ss');
...
$string = str_replace($accenttweak_from,$accenttweak_to,$string);
...


If an array is used a non-1-to-1 correspondence is possible. I think for all languages with special characterset it could be very usefull. But I don't know if this works in both direction of mod_rewrite.

Edited by frankbeckers on 01/22/08 - 09:54 PM

_____________________
Naturheilkunde und Alternativmedizin - Das Portal für Ihre Gesundheit
Kochen Verzeichnis - Alles zum genießen, schlemmen und naschen
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

Admin Control Panel

   
Home    |    Features    |    Showcase    |    Reviews    |    Demos    |    Purchase    |    Manual    |    Support
© 2008 Paul Knierim. All rights reserved.