locked
User added languages. RRS feed

  • Question

  • User-985166062 posted

    I'm wondering whether to use the Globalization features in Asp.Net 2.0 or do my own implementation.

    I've seen comercial products like vBulletin or WordPress that provides you with a single XML that you can translate, rename and reupload and you have a new language available for your website.

    I want this kind of functionality for my application, but to start with, how can an enduser edit a .resx file ?

    Even if they can, I've seen that after you publish your application the resources files are converted to a dll and not deployed, therefore, I have no idea how can a compiled and running application "pick-up" a new .resx file added for a user.

    Is this possible ?

    Please, any comment or idea is very welcom.

     

    Friday, September 22, 2006 6:39 PM

All replies

  • User-503940700 posted

    Hi,

    You can deploy RESX files in raw form, so that users can edit them manually on the production server. The runtime will create a dynamic class wrapping that RESX file when the Page class is requested.

    Hope this helps,

    Vivek

    Saturday, September 23, 2006 4:41 PM
  • User-985166062 posted

    Thanks for your comment. 

    And how do I do that ? I mean when I publish, the languages will be already on dll files.

    How do I pull them from there and convince .net to read them from the .resx files ?

     

    Saturday, September 23, 2006 5:12 PM
  • User-503940700 posted

    See this extract from MSDN:

    A hybrid of options two and three will also be possible when ASP.NET 2.0 releases. That is, the ability to deploy pages and resources as source, while compiling all code separation files and other source into binary assemblies for deployment. This provides the flexibility of editing page layout and resource content, or deploying new localized resources for one or more pages, without causing unaffected application assemblies to be dynamically recompiled.

    Check the -u option of the ASP.NET compiler. The files in the App_LocalResources folder are compiled on request and are placed in raw XML form on the production server. If you are using the Web application project model, then all resources files are placed in raw forms to be updateable at a later stage.

    You application will pick up the resource files based on the culture you selected for the current thread in the code. The runtime will select the RESX file based on the culture name and compile it dynamically (if it is accessed the first time).

    Hope this helps,

    Vivek

    Sunday, September 24, 2006 5:48 AM
  • User-503940700 posted

    Also, please see this link for details on how to add resources for the new culture to an already deployed app:

    http://msdn.microsoft.com/en-us/library/sb6a8618.aspx

    Hope this helps,

    Vivek

    Sunday, September 24, 2006 6:00 AM