Hi Dieter,

Uhm, afaik, every url must do a pass trough the routing system, so if
you put all your "mapping" , or "filtering" logic in there, you can
change it there, and only there, in case anything needs to changed
(please, correct me if i'm wrong)
Ok, I'll make a couple examples of the problems with url translations
in the context of a mid-sized internationalized (let's 3 languages) site:
  • Every $html->link(); will have to have imbedded logic to know which
    language to use, otherwise you need different versions for *every* view
    which seems very un-DRY to me.
  • All _javascript_ that uses url's alot (aka ajax) will have to know about the
    url routing logic
  • A lot of characters from other languages get escaped in url's, so you either
    have to use workarounds (like oe for ö in German) or life with very ugly urls
  • Debugging Missing Controller / Missing Action errors becomes a mess
    because you never quite know if it's a bug in the routing system, a problem
    with your controller, or your url itself
  • You make your site less RESTful. /posts/1 is very RESTful. /posts/view/1 is kinda
    RPC. /posts/view/my-great-post is a little nightmare in terms of REST, since "my-great-post"
    as an identifier might changes or looses uniqueness. But /beitraege/ansehen/mein-toller-beitrag
    is a big piece of #$!%, since somebody who doesn't speak german doesn't know which controller
    this relates to, which action it triggers, and even less what resource you talk about. Don't go
    there *ever* if you plan to create a webservice for your site, you'll be in great pain.
  • Orginzational overhead is big: For every controller/action you create you need to do n translations
    to make them work in a different language, given that you are not crazy enough to use an approach
    like mixed-language-url's if not all translations are available.
Now all of those problems are just off the cuff. Coding the thing will show a lot more problems that you maybe couldn't even imagine before. But given that my quick-list is pretty long already and some of the issues are fairly severe, you should be able to see WHAT kind of mess you are dealing with.

and yes, imo the user benefits from an url in his own language.  not
every visitor understands english decently enough to understand _all_
urls (which can get complicated if you get difficult words as actions)
Sure he does, if he would actually *read* urls. Unless your target audience is a bunch of web developers and geeks, you'll soon realize that people don't even *look* at anything but the domain in a url, and even that they don't really do (talking about phishing). Is it worth hours and hours of your time to work on a cute little detail (that's really all it is) compared to the amount of features you could add to the web site in the same time? I know the answer for myself.

Just take my advice, I like pretty url's a lot. I tried to create internationalized url's before and it always ended up being a big mess, tons of work and almost killed the project. I'm not going there again, ever (unless somebody comes up with a really easy way to do it, that is).

But hey, if you still think it's worth it, do it. I'd like to hear about your success with it and would be very impressed if you can make it a worthwhile cause.

Best Regards,
Felix Geisendörfer
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---




Reply via email to