tags:

views:

293

answers:

3

Hi,

I'm thinking of developing the following but wondering if it already exists out there:

I need a SQL based solution for assigning and managing localization text values for an asp.net site instead of using RESX files. This helps maintain text on the site without having to take it down for deployment whenever an update is required.

Thanks.

+1  A: 

We actually went down that path, and ended up with a really really slow web site - ripping out the SQL-based translation mechanism and using the ASP.NET resources gave us a significant performance boost. So I can't really recommend you do that same thing.... (and yes - we were caching and optimizing for throughput and everything - and the SQL based stuff was still significantly slower).

You get what you pay for - the SQL based approach was more flexible in terms of being able to "translate" on the fly, and fix typos and stuff. But in the end, in our app (Webforms, .NET 2.0 at that time), using resources proved to be the only viable way to go.

marc_s
In an app that I've built we were considering going down this very road of moving the resources into a database. I always wondered about the performance ding (I knew there would be one) of doing this.
Thomas
I totally disagree. Translation data is totally easy to cache and with an well executed solution, performance should not be an issue!
Robert
@Robert: you're free to disagree - I can only talk about the fact of our experience we had. And we did some quite aggressive caching too - never got the performance even remotely comparable to RESX. That's our story.
marc_s
@Marc_s: I totally trust your experience, but maybe the implementation was the problem, not the general concept?
Robert
@Robert: maybe - I don't know - I just wanted to warn that it might not be as easy as it looks at first, at least to get it up and running with good performance
marc_s
@Marc_s, @Robert. Thanks guys. This is a great discussion. @Marc_s I'm interested to know about the kind of load you had on your site. I run a site with static and dynamic pages, the dynamic pages get around 6 million page views per month and all resides on ASP.Net.
Laith
A: 

We did this (SQL-Based Translation) and we are really happy with the result! We developed an interface for translation-agencies to perform the updates to the page online. As a side effect, the solution started to serve as content-management system. If you cache your data, performance is not an issue. The downside is, that we invested multiple hundreds of hours into our solution. (I would guess sth. arround 600 hours, but I could check.).

Robert
@Robert, This is how I imagined it. My site is really big and its getting harder to make the smallest updates like text, simple styles, show/hide elements, manage site menus...etc I'm having my team tackle each at a time by building small SQL based management systems which will eventually add up to a site-wide CMS. My two main concerns heading down that road are:1- Database load2- managing text and configuration between the local development environment and the love environmentCan you tell me more about your project, scope, load, size...etc?thanks.
Laith
We have at peaks 20 000 visitors a day and at peaks 200 concurrent active users. We cache all translations in the ASP.NET Cache. SQL-Load is no issue that way. When somebody edits translations, the cache gets invalidated and is refilled from the database. (I am not sure if do any segmentation here.) We store translations in 3 tables. "Translaiton", "TranslationGroup", "TranslaionValue". We have currently 48738 TranslationValues (25 or so languages) for 2427 Items to translate in 230 Groups (A single page is group or Placeholders by topic are connected that way).
Robert
We considered to open source our solution, but did not find the time to do so.
Robert
Thanks for the details Robert. This is really helping.Now, my next concern is how best to populate the labels and other controls on the page with the text from the databse? My initial thought would be to try and override the way .Net handles resource files and just change the source of the data. i.e. so that I can still use "..meta:resourceKey = "".... when assigning resources to controls. I'm curious to know what approach you used for this part.thanks.
Laith
A: 

We ended up with a hybrid solution where users could edit content into a database but the application then created a .resx which was deployed manually.

You could also bypass the server translation altogether and do translation in jQuery on the client which is an approach I have used successfully.

James Westgate