darx wrote:
> Hi bakers,
> i know it's been asked before but none of the threads was so claryfing.

I know exactly what you mean :) I've gone through about 20 topics on
this group, of which most ones end up in pointing to the same solution
(which is ad7six locale package)

I also noted this pretty radical different point of view between the
locale package and what you and me try to achieve.
Whereas you and me want to have the urls in native language of the
user, the locale package focuses on using english-url's and then
showing content in the right language (at least, that's what i
understood of it when skimming ad7six' tutorial on the wiki)

So our problem (well at least mine, yours is similar but not entirely
the same i think) is that controllers and actions should be named in
english (programming in a language other then english is not a good
practice imo), while we want our url's in a language other then
english. (but "map" these urls to english ones, or at least call the
english controllers and actions)

The solution that i've come up with, is to take $from_url, split it in
parts, and then check each part if it should be mapped to something
else. (eg map indici to index, map newzi to news, etc), then i
reconstruct the $from_url again, which is the translated (where
nessecary) version of the original one, and the normal routing
functions go on from that.

I'm still tweaking my code, and will post it later on
 (ftr: it would be cool if the routes.php would have something like
components like controllers do, to modularize code also on other levels
then models, views and controllers. or is this possible already?)

Oh, and for the record, my site is in 1 language only (dutch) so i
don't have to worry about selecting languages in my controller (or
view), i just map the dutch url to an english one and all my views
shows the dutch content anyway


--~--~---------~--~----~------------~-------~--~----~
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