Jump to content

Accents in posts urls


Durango

Recommended Posts

Posted

Hello,

We have a forum in french, and like in spanish or other latin languages we have accents in forum titles like : "Réseaux sociaux" which gives a weird url :

/communaute/forum/67-r%C3%A9seaux-sociaux

What we would like to have is :

/communaute/forum/67-reseaux-sociaux

How could we get that ? as it is much better to share the second url than the first one above

Tx for your help !

Posted

Yes, I can include support for any languages. I need a list of letters (which differ from letters in English) in your language and relevant English letters for doing this.

For example, for Russian it is:

А - a
Б - b
В - v
Г - g
Д - d
...
Ш - sh
Щ - shh
Posted

Hi Ilya !

wow congrats for your plugin ! :)

so basically in french two letters with accents are very common : à and é

but just in case here is a good list :

à - a

â - a

ç - c

é - e

è - e

ê - e

ï - i

î - i

ô - o

û - u

and the same but in capital letters

EDIT : i just found a nice code, maybe using this would be easier for you :

function removeaccents($string) 
{  
        $string= strtr($string,  
      "ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ", 
      "aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn");  
       
        return $string;  
}

this has the advantage to work for the following languages : French, Italian, Spanish :)

tell me if you need any other information, tx a lot ;)

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...