You Deploy to sub domain in the AppsForDomain Interface, You detect the URL from the request headers.
You serve the appropriate page. Pretty standard Mult-tenant set up. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of GoingGlobal Sent: Wednesday, December 14, 2011 8:37 PM To: Google App Engine Subject: [google-appengine] Translate according to domain Hi, We'd like to run our AppEngine app on two sites (say en.example.com and fr.example.com), with the first being in English and the second being in French. Both sites are running against/updating the same datastore. I'd like to be able to call something like Lang.get("string_key") to lookup the text in the appropriate language for the site the current request is coming from. In JSP code, I can find the domain to determine the language but then I'd have to pass the language ( Lang.get("en","string_key") ) or pass the request (Lang.get(request,"string_key"). I don't like that because it's more work and makes my JSP less readable, but it'll work. But what about Java code deep inside some other classes without access to the request? I could set a static var in Lang to remember the language when a request first comes in, but that'd only work for single-threaded Instances and we're multithreaded for performance/cost reasons. Alternatively, I thought if I could make sure that different App Engine JVM Instances are used for the different domains, then at initialization time, it could detect the domain and determine the language to translate to and save it to a static var in Lang. I haven't seen anything to suggest that Instances are be reserved for certain domains, so I doubt this is possible. Anyone have any advice or other ideas? Thanks. -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en. -- You received this message because you are subscribed to the Google Groups "Google App Engine" 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/google-appengine?hl=en.
