Support » Plugin: ProjectManager » [Plugin: ProjectManager] Omit accents in the Search

  • Hello.
    First I want to thank Kolja Schleich this plugin is great and works well.
    I’m from Spain and use accents. What should I do to make the search results Martínez = Martinez? In case there are no problems.

    Where should I add this code?

    $translation = array(
    ‘from’ => array(
    ‘à’,’á’,’â’,’ã’,’ä’, ‘ç’, ‘è’,’é’,’ê’,’ë’, ‘ì’,’í’,’î’,’ï’, ‘ñ’,
    ‘ò’,’ó’,’ô’,’õ’,’ö’, ‘ù’,’ú’,’û’,’ü’, ‘ý’,’ÿ’, ‘À’,’Á’,’Â’,’Ã’,
    ‘Ä’,’Ç’, ‘È’,’É’,’Ê’,’Ë’, ‘Ì’,’Í’,’Î’,’Ï’, ‘Ñ’, ‘Ò’,’Ó’,’Ô’,’Õ’,
    ‘Ö’, ‘Ù’,’Ú’,’Û’,’Ü’, ‘Ý’)
    ‘to’ => array(
    ‘a’,’a’,’a’,’a’,’a’, ‘c’, ‘e’,’e’,’e’,’e’, ‘i’,’i’,’i’,’i’, ‘n’,
    ‘o’,’o’,’o’,’o’,’o’, ‘u’,’u’,’u’,’u’, ‘y’,’y’, ‘A’,’A’,’A’,’A’,’A’,
    ‘C’,’E’,’E’,’E’,’E’, ‘I’,’I’,’I’,’I’, ‘N’, ‘O’,’O’,’O’,’O’,’O’,
    ‘U’,’U’,’U’,’U’, ‘Y’)

    Or this?

    function check_array($array, $string){
    $trans = array(“é” => “e”, “é” => “e”, “á” => “a”, “á” => “a”, “í” => “i”,”í”=>”i”, “ó”=>”o”, “ó” => “o”, “ú” => “u”, “ú”=>”u”,”ö” => “u”, “ü”=>”u”);
    $realString = strtr($string,$trans);
    foreach($array as $val){
    $realVal = strtr($val,$trans);
    if(strcasecmp( $realVal, $realString ) == 0){
    return true;
    return false;

    Thanks and regards

  • The topic ‘[Plugin: ProjectManager] Omit accents in the Search’ is closed to new replies.