views:

43

answers:

1

I am trying to translate some of the phrases of my website into various languages. so, in my database, I have a table with rows of

ID//text//dest_language//text_in_dest_language

At the moment, I retreive each translation one by one:

get text_in_dest_language where text="Hello World" and dest_languge="zh"

This results in 40-50 db calls per page, which, on the app engine, is rather slow.

What can I do to mitigate this slowdown?

A: 
  1. Cache them in the application server layer (in ASP.NET, you can store it in the Application object or in the Session object).

or

  1. Make a single DB call to get a single recordset of all the phrases used in the page.
Cade Roux