On Nov 13, 2011, at 11:07 AM, Bruno Rocha wrote:

> > Here's an alternative, though. I think it might work. In your controller, 
> > do something like this:
> >
> > def articles():
> >    whatever
> >
> > artigos = articles
> > articulos = articles
> > artiklid = articles
> >
> 
> it does not works. to work need to be
> 
> def artigos():
>     return aricles()
> 
> and repeat for others...
> 
> the only problem is that I cant rename the controller name in this way.
> 

Oh, right, web2py looks at the text of a controller and not at its symbols.

For controllers, you could link the alternate names (assuming this is Unix-ish):

$ ln articles artigos
$ ln articles articulos
...


Yet another trick (undocumented and subject to change): in db.py (or anywhere 
in your model files) translate request.controller and request.function.

Reply via email to