I use the following.  I believe I copied most of it from Felix or
Daniel, but it was a while ago and I can't really remember :)


function title_slug( $title )
{
        $slug = $title;

        $bad =
array(  
'Š','Ž','š','ž','Ÿ','À','Á','Â','Ã','Ä','Å','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ñ',
                                        
'Ò','Ó','Ô','Õ','Ö','Ø','Ù','Ú','Û','Ü','Ý','à','á','â','ã','ä','å','ç','è','é','ê',
                                        
'ë','ì','í','î','ï','ñ','ò','ó','ô','õ','ö','ø','ù','ú','û','ü','ý','ÿ',
                                        
'Þ','þ','Ð','ð','ß','Œ','œ','Æ','æ','µ');

        $good =
array(  
'S','Z','s','z','Y','A','A','A','A','A','A','C','E','E','E','E','I','I','I','I','N',
                                        
'O','O','O','O','O','O','U','U','U','U','Y','a','a','a','a','a','a','c','e','e','e',
                                        
'e','i','i','i','i','n','o','o','o','o','o','o','u','u','u','u','y','y',
                                        
'TH','th','DH','dh','ss','OE','oe','AE','ae','u');

        // replace strange characters with alphanumeric equivalents
        $slug = str_replace( $bad, $good, $slug );

        return $slug;
}

On Feb 10, 8:13 am, "Alex" <[EMAIL PROTECTED]> wrote:
> Hi Sergei,
>
> Thanks four your answers. It sounds logically.
>
> > As for filenames, I use only basic latin letters.
>
> Do you make a transformation for utf8 letters to their similar latin
> letter like A for Ä and O for Ö?
> Does a function for this task exist?
>
> Greetings,
> Alex


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to