Hi everyone,

Posted this via GMANE about 2 hours ago (responded to autoauth), but
it still does not show up - apologies if it shows up twice.

I am just starting to look at web2py to use it for my first web
application (currently doing stuff using Python/wxPython for a desk
top app), been looking at TurboGears 2 and Django.

The project I would like to do with web2py (or one of the others)
should run on GAE (which seems to eliminate TG) and I18n for all text
is required, especially content coming from the db.

I have looked through the archive of the gmane list and came across
Maximo's video (http://www.vimeo.com/7520812) and the thread on
content internationalization (started by Alex in Oct 2009).

With regards to the later I have some questions.

The sample model shown in that thread is the following.

db.define_table('book',
     Field('isbn'))

db.define_table('book_translation',
     Field('book',db.book),
     Field('language'),
     Field('title'),
     Field('description'))

book = db.book.insert(isbn="1234567890")
db.book.translation.insert(
         book=book,
         language='en'
         title = "web2py for Dummies",
         description = "web2py described in simple words.")
db.book.translation.insert(
         book=book,
         language='pl'
         title = "web2py  opisane w prostych slowach")

How come the "translation" relation for "book" is "book.translation"
and not "book.book_translation"?  Is the prefix "book_" just removed
as it matches the parent table name?

Is there any default magic going to happen when showing the content?
What I mean is that I do a select with preferred language set to e.g.
'fr', what would be shown assuming the db only contains the above
data.

Is there somewhere a sample showing how this model is used on a view
(correct term?)?

Would like to wish everyone all the best for the New Year, especially
good health.

Werner

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to