What if in bootstrap.php you did something like the following (completely
untested):

if (ereg('^/eng/', $_GET["url"])) {
    $_GET["url"] = str_replace('/eng/', '', $_GET["url"]);
    $GLOBALS['lang'] = 'eng';
}

Then you could just route it normally (without the language path) and check
for the $GLOBALS['lang'] variable in the controller.

I'm sure you could come up with a more elegant solution to figuring out
which language, like checking for a two or three letter language code. I'm
just giving an example of bootstrap.php to show that you can take things out
of the $_GET['url'] and set variables from there.

HTH,
Eric



On 2/9/07, Ámon Tamás <[EMAIL PROTECTED]> wrote:
>
> mindcharger wrote:
> > Hi,
> >
> > I think if you edit ans study the routes.php file carefully you might
> > be able to make it!!
> >
> > Good luck
>
> Sorry, but I do not really understand it. What I must to make in
> routes.php to work it?
>
> >
> > On Feb 8, 3:30 pm, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> >> Max wrote:
> >>> I am looking for the same solution..
> >> Hmmm. I think it is a very difficult thing... :)
> >> I like to make something similar like in drupal i18n module. This is
> >> working in the same way.
> >>
> >> I try to see the routes but do not find any solution. Is there any
> >> tutorial or examples about routes?
> >>
> >>
> >>
> >>
> >>
> >>> On Feb 8, 12:38 am, Ámon Tamás <[EMAIL PROTECTED]> wrote:
> >>>> Hello,
> >>>> I have a site with cake with normal routing (like
/controller/action/).
> >>>> And I like to make it multilingual. I wondering to change every link
to
> >>>> /lngcode/controller/action, where is lngcode is the language code.
What
> >>>> is the easiest way to make it?
> >>>> Thanks for helps
> >>>> --
> >>>> Ámon Tamás
> >> --
> >> Ámon Tamáshttp://linkfelho.amon.hu
> >
> >
> > >
> >
>
>
> --
> Ámon Tamás
> http://linkfelho.amon.hu
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to