Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can also use the function described <a href="http://www.jonathan-petitcolas.com/convertir-une-phrase-pour-lurl-rewriting-en-php/" rel="nofollow">here</a> (in French):</p> <pre><code> /** * Convert into filename by removing all accents and special characters. Useful for URL Rewriting. * @param $text * @return string */ public function ConvertIntoFilename($text) { // Remove all accents. $convertedCharacters = array( 'À' =&gt; 'A', 'Á' =&gt; 'A', 'Â' =&gt; 'A', 'Ã' =&gt; 'A', 'Ä' =&gt; 'A', 'Å' =&gt; 'A', 'à' =&gt; 'a', 'á' =&gt; 'a', 'â' =&gt; 'a', 'ã' =&gt; 'a', 'ä' =&gt; 'a', 'å' =&gt; 'a', 'Ò' =&gt; 'O', 'Ó' =&gt; 'O', 'Ô' =&gt; 'O', 'Õ' =&gt; 'O', 'Ö' =&gt; 'O', 'Ø' =&gt; 'O', 'ò' =&gt; 'o', 'ó' =&gt; 'o', 'ô' =&gt; 'o', 'õ' =&gt; 'o', 'ö' =&gt; 'o', 'ø' =&gt; 'o', 'È' =&gt; 'E', 'É' =&gt; 'E', 'Ê' =&gt; 'E', 'Ë' =&gt; 'E', 'é' =&gt; 'e', 'è' =&gt; 'e', 'ê' =&gt; 'e', 'ë' =&gt; 'e', 'Ç' =&gt; 'C', 'ç' =&gt; 'c', 'Ì' =&gt; 'I', 'Í' =&gt; 'I', 'Î' =&gt; 'I', 'Ï' =&gt; 'I', 'ì' =&gt; 'i', 'í' =&gt; 'i', 'î' =&gt; 'i', 'ï' =&gt; 'i', 'Ù' =&gt; 'U', 'Ú' =&gt; 'U', 'Û' =&gt; 'U', 'Ü' =&gt; 'U', 'ù' =&gt; 'u', 'ú' =&gt; 'u', 'û' =&gt; 'u', 'ü' =&gt; 'u', 'ÿ' =&gt; 'y', 'Ñ' =&gt; 'N', 'ñ' =&gt; 'n' ); $text = strtr($text, $convertedCharacters); // Put the text in lowercase. $text = mb_strtolower($text, 'utf-8'); // Remove all special characters. $text = preg_replace('#[^a-z0-9-]#', '-', $text); // Remove two consecutive dashes (that's not very pretty). $text = preg_replace('/--/U', '-', $text); // Remove words containing less than 2 characters (non significant for the meaning) $return = array(); $text = explode('-', $text); foreach($text as $word) { if(mb_strlen($word, 'utf-8') &amp;lt;= 2) continue; $return[] = $word; } return implode('-', $return); } </code></pre> <p>Yet, it will still require that you modify your .htaccess, like mentionned by AlienWebGuy. :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload