Last post Sep 24, 2006 06:00 AM by vivek_iit
Sep 22, 2006 06:39 PM|fischermx|LINK
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.
Sep 23, 2006 04:41 PM|vivek_iit|LINK
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,
Sep 23, 2006 05:12 PM|fischermx|LINK
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 ?
Sep 24, 2006 05:48 AM|vivek_iit|LINK
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).
Sep 24, 2006 06:00 AM|vivek_iit|LINK
Also, please see this link for details on how to add resources for the new culture to an already deployed app: