We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28173
    • 409 Posts
    Hi,

    I suppose it is not a big problem for english people but for french, espagnol... and every accentuated languages, there is a little problem : during the alias generation, the accentuated characters disappears
    Example : the generated alias of the title "Présentation" become "prsentation"

    It should be very appreciable to ameliorate the process in a future version to have a generated alias without accent but with all the letter (ie : "Présentation" -> "presentation")

    Thx
      • 7923
      • 4,213 Posts
      You can do it with a plugin, see this.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 16848
        • 3 Posts
        Simple solution to replace accents in alias on Modx Revolution :

        The magic trick => "urlencode"

        Place this code in : /core/model/modx/modressource.class.php => line 369 just before "return $alias" :

        // =================================================================================================================

        $alias = urlencode($alias);

        $a = array("c3a0","c3a1","c3a2","c3a3","c3a4","c3a5","c3a0","c3a1","c3a2","c3a3","c3a4","c3a5","c3b2","c3b3",
        "c3b4","c3b5","c3b6","c3b8","c3b2","c3b3","c3b4","c3b5","c3b6","c3b8","c3a8","c3a9","c3aa","c3ab","c3a8","c3a9",
        "c3aa","c3ab","c3a7","c3a7","c3ac","c3ad","c3ae","c3af","c3ac","c3ad","c3ae","c3af","c3b9","c3ba","c3bb","c3bc",
        "c3b9","c3ba","c3bb","c3bc","c3bf","c3b1","c3b1");

        $b = Array("a","a","a","a","a","a","a","a","a","a","a","a","o","o","o","o","o","o","o","o","o","o","o","o","e","e",
        "e","e","e","e","e","e","c","c","i","i","i","i","i","i","i","i","u","u","u","u","u","u","u","u","y","n","n");

        $alias = str_replace($a, $b, $alias);

        // =================================================================================================================

        grin
          • 28173
          • 409 Posts
          How submit this nice tip to the dev for a future version ?
          Is there oposition to use this one by default in future version of MODx Revolution (and Evo) ?
            • 22303 MODX Staff
            • 10,725 Posts
            This is already available. See the translit package for an example.
              • 28173
              • 409 Posts
              Thanks OpenGeek smiley
              But ma question is more about the "by default"
              If I need to install a package to have this universal* transcodage, it’s not "by default" smiley

              Spheerys

              *for me, but I listing every alternative way of thinking ^^
                • 22303 MODX Staff
                • 10,725 Posts
                There is no universal "transcodage" — this is why the core provides basic transcoding via platform extensions and can be extended via Add-Ons to do custom transcoding to order.
                  • 28173
                  • 409 Posts
                  I thought a transcodage proposed by lechmit was a good "default" for the majority of languages.
                  Anycase, better than a transcode based on characters deletion, for example : "déjà-vu" to "dj-vu"

                  Is there a place to debate of this ?
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: Spheerys at Aug 01, 2011, 10:07 AM

                    I thought a transcodage proposed by lechmit was a good "default" for the majority of languages.
                    Anycase, better than a transcode based on characters deletion, for example : "déjà-vu" to "dj-vu"

                    Is there a place to debate of this ?
                    We are discussing it right here.

                    With my default settings, there is no loss of any characters in the alias, déjà-vu stays déjà-vu. This is the default behavior as designed and intended. If you want to apply transliteration techniques, there is a mechanism for it in place. Is this default loss of characters because you are attempting to use the iconv friendly_alias_translit setting?