Support » Plugin: Regenerate post permalink » Diacritics problem

  • In slovak language we have diacritics like +ľščťžýáž and more

    and this plugin regenerate permalink with diacritics lika “čau-svet-vitaj” but better way is “cau-svet-vitaj”

    without diacritics.

    Can you update plugin?

    EDIT: I add this to the plugin code:

    //remove diacritics
    function clear_diacritics($text) {

    $table = array(

    ‘À’=>’A’, ‘Á’=>’A’, ‘Â’=>’A’, ‘Ã’=>’A’, ‘Ä’=>’A’, ‘Å’=>’A’, ‘Æ’=>’A’, ‘à’=>’a’, ‘á’=>’a’, ‘â’=>’a’, ‘ã’=>’a’, ‘ä’=>’a’, ‘å’=>’a’, ‘æ’=>’ae’,
    ‘Č’=>’C’, ‘č’=>’c’, ‘Ć’=>’C’, ‘ć’=>’c’, ‘Ç’=>’C’, ‘ç’=>’c’,
    ‘Ď’=>’D’, ‘ď’=>’d’,
    ‘È’=>’E’, ‘É’=>’E’, ‘Ê’=>’E’, ‘Ë’=>’E’, ‘Ě’=>’E’, ‘è’=>’e’, ‘é’=>’e’, ‘ê’=>’e’, ‘ë’=>’e’, ‘ě’=>’e’,
    ‘Ì’=>’I’, ‘Í’=>’I’, ‘Î’=>’I’, ‘Ï’=>’I’, ‘ì’=>’i’, ‘í’=>’i’, ‘î’=>’i’, ‘ï’=>’i’,
    ‘Ñ’=>’N’, ‘ñ’=>’n’,
    ‘Ò’=>’O’, ‘Ó’=>’O’, ‘Ô’=>’O’, ‘Õ’=>’O’, ‘Ö’=>’O’, ‘Ø’=>’O’, ‘ð’=>’o’,’ò’=>’o’, ‘ó’=>’o’, ‘ô’=>’o’, ‘õ’=>’o’, ‘ö’=>’o’, ‘ø’=>’o’,
    ‘Ŕ’=>’R’, ‘Ř’=>’R’, ‘Ŕ’=>’R’, ‘ŕ’=>’r’, ‘ř’=>’r’,
    ‘Š’=>’S’, ‘š’=>’s’, ‘Ś’=>’S’, ‘ś’=>’s’,
    ‘Ť’=>’T’, ‘ť’=>’t’,
    ‘Ù’=>’U’, ‘Ú’=>’U’, ‘Û’=>’U’, ‘Ü’=>’U’, ‘ù’=>’u’, ‘ú’=>’u’, ‘û’=>’u’,
    ‘Ý’=>’Y’, ‘ÿ’=>’y’, ‘ý’=>’y’, ‘ý’=>’y’,
    ‘Ž’=>’Z’, ‘ž’=>’z’, ‘Ź’=>’Z’, ‘ź’=>’z’,
    ‘Đ’=>’Dj’, ‘đ’=>’dj’, ‘Þ’=>’B’, ‘ß’=>’Ss’, ‘þ’=>’b’,

    );

    $name = strtr($text, $table);

    //echo $name . “</br>”;
    return $name;
    }

    and edit to this sanitize_title_with_dashes(clear_diacritics($pid->post_title))

    And its works 🙂

  • The topic ‘Diacritics problem’ is closed to new replies.