Many thanks for your answer Massimo. I hope that you accept my next words as a constructive criticism.
Because of "little things" like this, so many developers do not like web2py, the router should be completly independent from the app code, so any changes on the router will not affect the app code, right now I will need to build my app using a different framework. Of course I will continue using web2py, but will be great if I could use it without problems when my applications demands more exigent use cases. Of course, the most of the people do not think like me and begin to use another framework that works either with small and complicated applications, thats why they don't like and don't use web2py, not because they are "purists" Greetings. El domingo, 31 de julio de 2016, 2:39:17 (UTC-4), Massimo Di Pierro escribió: > > This is a limitation with routes out. The left hand side cannot contain > "?" and vars. > You can maps path_info into request.vars in the way but not the vice versa > in the way out. You have to put the language in the args and the do the > remapping on the way out. > > On Friday, 29 July 2016 23:12:07 UTC-5, Carlos Cesar Caballero wrote: >> >> Hi everyone, again with problems with the router here, I have this rule >> in routes_in, and is working pefectly: >> >> ('/$lang/$country/$state/$city(?P<any>.*)', >> '/{app}/city/view\g<any>?lang=$lang&country=$country&state=$state&city=$city'.format(app=app)) >> >> This maps the url and I can use the language, the country, the city and >> the state as variables in my controller, the problem is with the routes_out: >> >> ( >> '/{app}/city/view(?P<any>.*)?lang=$lang&country=$country&state=$state&city=$city'.format(app=app), >> >> '/$lang/$country/$state/$city\g<any>') >> >> Always that I put something like ?lang=lang in routes_out it breaks, >> gives no error, but the rule don't work. >> >> I am having other problem, and is with the url vars position, web2py uses >> a dictionary in some step and don't keep the url vars order (even if I use >> a orderedDict in the URL() vars argument). I have used the Yii2 framework >> router and it don't care about the url vars order. We have, or can we have >> something similar with web2py? >> >> Greetings. >> >> >> El jueves, 7 de julio de 2016, 8:50:46 (UTC-4), Carlos Cesar Caballero >> escribió: >>> >>> Hi, I need some starting point to implement the URL based >>> internationalization using the pattern based router, I really need to use >>> the router, but there is so little documentation... >>> >>> I am clonning our yii2 cms base application (supporting right now sites >>> like http://santiagohermes.com http://anniaalonso.com, >>> http://alborarquitectos.com and http://casamabehostal.com) and it is >>> almost done (you can look working in http://daxslab.com/) but I need to >>> add some functionalities with the router before sharing it to everyone. >>> >>> Greetings. >>> >> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.