sitemap  |  contact

Sakic.Net Forum
08 January 2009, 14:31 *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Introducing AJAX Scroller - Joomla News Slider Module: http://www.sakic.net/news/introducing_ajax_scroller/
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [URL-replace] Saka, you MUST find a better solution for THAT  (Read 1262 times)
lorange
Newbie
*
Posts: 3


View Profile
« on: 19 September 2007, 21:12 »

Hello,  Wink

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!  Tongue


SEF Advanced looks useless for all non english web sites.  Cry

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.
Logged
Saka
Administrator
Hero Member
*****
Posts: 1,352


View Profile WWW
« Reply #1 on: 20 September 2007, 00:58 »

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.
Logged

lorange
Newbie
*
Posts: 3


View Profile
« Reply #2 on: 02 August 2008, 18:24 »

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:

Code:
  <?php 

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

     return 
$string2
    } ; 

?>
 

Could it be a possible solution?

Thank you for your answer.
Logged
Saka
Administrator
Hero Member
*****
Posts: 1,352


View Profile WWW
« Reply #3 on: 02 August 2008, 20:18 »

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: http://www.sakic.net/forum/sef_advance/read_this_no_longer_url_replace_thanks_to_joomla_15-t726.0.html
Logged

lorange
Newbie
*
Posts: 3


View Profile
« Reply #4 on: 03 August 2008, 00:44 »

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:

http://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
Logged
Saka
Administrator
Hero Member
*****
Posts: 1,352


View Profile WWW
« Reply #5 on: 03 August 2008, 11:33 »

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.
Logged

Pages: [1]
  Print  
 
Jump to: