locked
Problem using sitemap localization with satellite assemblies RRS feed

  • Question

  • User-2039260602 posted

    Hi!

    I have the main application with a sitemap file.  And all the string resources are in two separate projects like a english project and spanish project.  I'm using these two satellite assemblies in the main project.  For ex: the main application name is "myapp.dll" and the two satellite assemblies are "myapp.en-US.resources.dll" and "myapp.es-MX.resources.dll".

    Now i want to add localization support to my sitemap.  And i understand that we have explicit resource key mechanism to point to a class(resx file) in app_globalresources folder for english and spanish.

    The problem here is when we compile the solution, the main app is also generating "myapp.en-US.resources.dll" and "myapp.es-MX.resources.dll" which are copied to the bin folder.  So now i can only use the satellite assemblies or the dlls for sitemap.  I cannot use both.

    Is there any solution for this?  Can i have my sitemap take the resources from the satellite assemblies?  Why is it only taking the resources from app_globalresources?

    Thanks

    Venugopal

     

    Friday, September 8, 2006 7:25 PM

Answers

  • User-503940700 posted

    Hi Venu,

    I am not sure why are you creating separate projects for your satellite assemblies. ASP.NET creates the same dynamically (using the resource files) out of which the appropriate one is picked up based on the current thread's culture info.

    See this article for details:

    http://www.codeproject.com/useritems/localization.asp

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 9, 2006 1:05 AM

All replies

  • User-503940700 posted

    Hi Venu,

    I am not sure why are you creating separate projects for your satellite assemblies. ASP.NET creates the same dynamically (using the resource files) out of which the appropriate one is picked up based on the current thread's culture info.

    See this article for details:

    http://www.codeproject.com/useritems/localization.asp

    Hope this helps,

    Vivek

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, September 9, 2006 1:05 AM
  • User-2039260602 posted

    Hi Vivek,

    Thanks for the response.  But it is the recommended model in .net right?  Also, if we use app_globalresources whenever you change a value in any resource file, i agree that the corresponding dlls are created automatically but the entire application will restart which we dont want to happen.  If we maintain them in a separate project, we can recompile the dll and update the dll on the fly.  The application will pick up the new dll and continue to work.  Thats a huge advantage.  I read many articles that say this as a recommended approach and practically i felt the same.

    But i didnt understand how could MS overlooked this potential problem.  It seems to me that we cannot localize sitemap with satellite assemblies.  Please let me know if there is any workaround.

    Thanks 

    Monday, September 11, 2006 12:15 PM
  • User-503940700 posted

    Hi Gopalav,

    Sorry for my late response. I just confirmed that even if you replace the DLL, it will lead to an application restart. Any changes in the /bin folder will make the app restart. So is there any other use for using a separate project for resources? Or are you seeing a different behavior (like app is not geting restarted by changing the dll's on fly)?

    Vivek

    Tuesday, September 26, 2006 6:28 AM
  • User-2039260602 posted

    Hi Vivek,

    We observed that the Application is not restarting if we change the satellite assembly in runtime.  Thats a huge advantage right?  That is the main reason we chose satellite assemblies over app_globalresources.

    Thanks

     

    Thursday, September 28, 2006 11:59 AM
  • User-503940700 posted

    Hello,

    I need to clarify this myself. Actually I asked the same to Scott in one of his blogs and I need to verify the answer myself too (just give me a few days). Meanwhile, you can have a look at my post to Scott's blog at:

    http://weblogs.asp.net/scottgu/archive/2006/05/30/ASP.NET-2.0-Localization-_2800_Video_2C00_-Whitepaper_2C00_-and-Database-Provider-Support_2900_.aspx

    See the last comments and let me know if I asked the right thing.

    Thanks,

    Vivek

    Thursday, September 28, 2006 2:44 PM
  • User-2039260602 posted

    Hi!

    I saw your comment.  Its correct but not complete.  We already know that using satellite assemblies is not restarting the application and using app_globalresources is restarting the app. 

    But the problem here is, with the sitemap feature and satellite assemblies.  As far as i know, sitemap file is expecting the resource file in app_globalresources and if we place a resx file there, the compiler will create another set of resource dlls thus overwriting my satellite assemblies.  The names of the dlls are the same.

    I posted a comment to Scott explaining my problem.  Please visit the blog.

    Thanks a lot for your help in this regard.

    Thursday, September 28, 2006 3:13 PM
  • User-503940700 posted

    Hi,

    Did you get any reply to your email to Scott?

    Would like to know what method you used finally :-)

    Thanks,

    Vivek

    Sunday, October 15, 2006 2:16 PM