• dgcebas

    (@dgcebas)


    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(
    ‘à’,’á’,’a’,’?’,’?’, ‘?’, ‘è’,’é’,’ê’,’?’, ‘ì’,’í’,’?’,’?’, ‘?’,
    ‘ò’,’ó’,’?’,’?’,’?’, ‘ù’,’ú’,’?’,’ü’, ‘y’,’?’, ‘à’,’á’,’?’,’?’,
    ‘?’,’?’, ‘è’,’é’,’ê’,’?’, ‘ì’,’í’,’?’,’?’, ‘?’, ‘ò’,’ó’,’?’,’?’,
    ‘?’, ‘ù’,’ú’,’?’,’ü’, ‘Y’)
    ‘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

    https://www.ads-software.com/extend/plugins/projectmanager/

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