Hi!


I'd like to implement "clean" locale-aware URLs, meaning no _LOCALE_ in params, cookies, or similar. For example, route:

/en/page/{id}

What are your thoughts on how I should implement this. As I see it, my options are

1. Write a tween or something that parses the URL before the router sees it, takes out the identifier and passes along teh URL without the identifier, for language agnostic routes:

/page/{id}

This would also mean that if the language id is missing in the URL the default language should be used.


2. Use a custom root factory that extracts the identifier, but leaves the URL intact since that would be post-routing, meaning the routes would have to include the identifier, always:

/{lang_id}/page{id}


3. Something I'm missing?


The routing is dispatch based, no traversal.

Also, I want to implement database-based translations, because I want the users to be able to translate various text items through teh admin interface and never touch the code or restart the app for new languages. Does that mean should completely ignore the gettext-based i8n subsystem in Pyramid?


Thanks!

--

.oO V Oo.

--
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to