Search code examples
asp.netasp.net-mvclocalizationresx

Editable resource files in a deployed ASP.Net site


Apparently, my understanding of .resx files was flawed - I had assumed (without testing) that they were deployed as XML so as to remain editable at a later time - clearly, this is incorrect. So, I'm left with a gap I need to fill for the labels and format strings in our company's web application, hopefully someone here can point me in the right direction.

I'm looking for a solution that can support multiple languages, and can be edited by a system administrator at a later date. For the first requirement, resx files work perfectly - if the UI culture is changed, the appropriate resource is used, or it defaults to the top level resource if no culture specific resource is available. Unfortunately, if company A wants a resource string to be "Account Number", and company B wants that same string to be "Account ID", we have no good way to support this - we don't want to have to compile a different version of the web site for each company, just to change a few resource strings - ideally, those strings could simply be set by the company's tech person after deployment.

Is there a framework out there that will be of use here? Or perhaps a different way to approach the problem using resx files?'


Solution

  • You really can't use resx files for your pre-compiled solution.

    There are two options:

    1. Deploy an uncompiled version of your site.

    2. Implement a database solution, and create an administrative area for updating the text, so a user may log in and make changes. You would be able to maintain your precompiled code.