[URL-replace] Saka, you MUST find a better solution for THAT

17 years 2 days ago #1377 by lorange
Hello,  ;)

Your script looks really nice and I was ready to buy it.

BUT my website is french. Do you know that nearly all European languages use accents and special characters and most of languages in the world use other diacritical marks?

Replace "é" with "eee" (for example) is NOT a solution.

--> été (which means summer in french) is not equal to eeeteee!  :P


SEF Advanced looks useless for all non english web sites.  :'(

PLEASE let us know if you are willing to solve this problem or if we should look for another SEF script.

Thank you for your answer and sorry for my poor english.

Lorange, from Switzerland.

Please Log in or Create an account to join the conversation.

17 years 2 days ago #1378 by Saka
You don't need to use upper case and colors to draw my attention. I am very well aware that many languages use accents and that you want to replace special characters with their non-accent equivallent. However, there is a reason why the things work like they do.

It is very easy to do this kind of URL replace in SEF programs that store each URL in your database. But it's not easy to do in SEF Advance which doesn't store URLs at all and does all conversion on-the-fly. This type of conversion has shown to be much more effective in terms of performance, especially with websites with much content. Its downside is that it is not as flexible in terms of adjusting the URLs.

There is no way to get a "better" solution for URL replaces without downgrading the performance and conversion speed of SEF Advance. For example to convert "été" the system would need to search database for "ete", "eté", "éte" and "été", possibly even for "etë", "etè", "étè" and all other combinations. That would multiply nuber of database queries and cause huge performance downgrade, and performance is our first priority.

You can still get the effect you want with SEF Advance, either by using short URLs with article title aliases, or using manual URL aliases for each URL you want.

If this solution is not at your satisfaction you can look into some other SEF solution with database URL storage, with obvious performance drawbacks.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

16 years 1 month ago #3096 by lorange
Hello again,

You are usign some function to replace upper case by lower case (sefencode and sefdecode).
Couldn't you add a few lines into these functions to replace special and international characters with PHP? Something like this:
  <?php 

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

     return $string2; 
    } ; 

?> 

Could it be a possible solution?

Thank you for your answer.

Please Log in or Create an account to join the conversation.

16 years 1 month ago #3097 by Saka
Of course but that would work only one way. For example été would become ete in URL.
But then the decode would have no idea whether to look for été, eté, ètè, ëtë, etë, ëté, etc.

The way database solutions do it is to strip the special characters and save the non-sef/sef pair in database. When URL is later requested they look into the database for the pair. SEF Advance doesn't store URLs in database which gives it the performance advantage but all characters must be present in the URL.

You can still achieve the URLs without accents easily by using title aliases and short URLs. It is even easier in Joomla! 1.5 as noted in this thread: www.sakic.net/forum/sef_advance/read_thi...oomla_15-t726.0.html

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

16 years 1 month ago #3099 by lorange
Ok, thank you for your answer.

But finally... if I decide to keep the "é" without replacing it with "ee" or "eee"... I will get an URL like:

example.com/%c3%a9t%c3%a9.html (=http://example.com/été.html)

Is that really a problem? Does such an URL work with all browsers? What's about SEO?
Thank you for your answer.

Laurent

Please Log in or Create an account to join the conversation.

16 years 1 month ago #3101 by Saka
It will work on all browsers, that's the whole point of URL-encode. And search engines should read the URL correctly, it's just that it doesn't look nice to the human eye.

Emir Sakic
www.sakic.net

Please Log in or Create an account to join the conversation.

About us

We provide high quality Joomla components created by a co-founder and original core developer of Joomla. For over a decade, our products have been used by more than 20.000 webmasters around the world.

Stay in touch