Using SQL to localize instead of .resx files in ASP.NET

I am thinking about developing the following, but I wonder if it exists there:

I need an SQL based solution to assign and manage localization text values ​​for an asp.net site instead of using .resx files. This helps maintain text on the site without having to deploy it with every update.

Thanks.

+6
sql resx
source share
5 answers

We really went this way, and as a result a really very slow website appeared - breaking the SQL-based translation engine and using ASP.NET resources gave us a significant increase in performance. Therefore, I cannot recommend you to do the same ... (and yes - we cached and optimized for bandwidth and all), and SQL-based material was still much 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 correct typos and more. But in the end, in our application (Webforms, .NET 2.0 at the time), using resources was the only viable way.

+3
source share

We did it (SQL-Based Translation) and we are really happy with the result! We have developed an interface for translation agencies to perform updates on a page on the Internet. As a side effect, the solution began to serve as a content management system. If you cache your data, performance is not a problem. The disadvantage is that we invested several hundred hours in our solution. (I would suggest that about 600 hours, but I could check).

+1
source share

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

You can also bypass server translation altogether and do a jQuery translation on the client, which is the approach that I have successfully used.

0
source share

I am not sure about restarting the website, but at least using .NET MVC is very convenient, and I did not notice this restart problem, and if this happens, how often do you need to update the resx files? For large projects, I use to create a solution with several projects, one for localization, something like this:

  • Myapp.localization
    • Model
    • Page
    • File1.resx
  • Myapp.core
  • Myapp.web

Then in the web project, I add a link to the Localization project and use it as

@ MyApp.Localization.Model.Customer.CustomerName

@ MyApp.Localization.Page.About.PageTitle

@ MyApp.Localization.File1.Paragraph1

Each time I change the translated text, I either download the updated .dll or copy the .resx files.

NOTE. You need to install resx files in PUBLIC, so you can get them as strongly typed.

0
source share

I created a SQL-based translation scheme. But I only download the necessary translations for this page when it is requested, and only those for this particular page.

Those are loaded into the dictionary object when the page is reloaded and cached during the session. Then just replacing the text is based on a search on this.

To a large extent, all of this is dynamically generated and includes user-generated content that needs to be translated, so flexibility is key.

Performance is pretty fast, SQL queries to get all the data take much longer (relatively speaking).

0
source share

All Articles