Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Localization in precompiled application does not work

Answered Localization in precompiled application does not work

Feed from this thread
  • Alex avatar

    Posted on May 19, 2011 (permalink)

    We use MVC Grid in our MVC3 application. We need Russian localization so we follwed the instructions and put GridLocalization.ru-RU.resx to App_GlobalResources folder. And it works perfect on developers PC. We have standard deployment procedure which uses aspnet_compiler.exe to precompile application and publish it to production IIS. After we deployed our application this way we've found that localization does not work (everything is in English). I spend a few hours googling, switching build action (to embedded resource etc), moving dll around the bin folder -- nothing. It does not help. Finally I simply copied website to prod folder and it works fine now. So the question is: Is there any way to localize grid in precompiled application?

    Reply

  • Alex avatar

    Posted on May 23, 2011 (permalink)

    Could someone show me a direction of searching at least?

    Reply

  • nachid Master avatar

    Posted on May 23, 2011 (permalink)

    Have you checked that you have your App_GlobalResources folder containing all your resources files

    Reply

  • Alex avatar

    Posted on May 23, 2011 (permalink)

    App_GlobalResources does exist on web site but in precompiled application it is empty and should be empty. Instead of it there are App_GlobalResources.resources.dll in 'bin\ru-RU' folder. I looked in this dll and found Russian localized strings there. So the problem is that Telrik does not load resources from the dll, I guess.

    Reply

  • nachid Master avatar

    Posted on May 24, 2011 (permalink)

    I would say it depends how you configured your build action on each of these resx files
    Select resx file in Solution Explorer and then examine its properties in the Properties window.

    Reply

  • Alex avatar

    Posted on May 24, 2011 (permalink)

    It is set to "EmbeddedResource" now. But I tried different settings. And as I mentioned before localized strings are in dll. May be it should be just a Content?

    Reply

  • Answer Nikolay Rusev Nikolay Rusev admin's avatar

    Posted on May 24, 2011 (permalink)

    Hello Alex,

    Indeed currently the localization mechanism expects the App_GlobalResources folder to exist as it reads the resx files from there. For the next official release we will add support for loading compiled resources.

    Regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Alex avatar

    Posted on May 24, 2011 (permalink)

    Thanks for answer, Nikolay. It means that I am not mad at least. When are you going to make next release?

    Reply

  • Sebastian Sebastian admin's avatar

    Posted on May 24, 2011 (permalink)

    Hello Alex,

    The next release of our MVC extensions is expected in mid July.

    Kind regards,
    Sebastian
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Alexander avatar

    Posted on Aug 24, 2011 (permalink)

    Hi,

    We are facing with exactly the same issue as Alex did. Please confirm that the issue was fixed in the last release of MVC extensions (2011 Q2).

    Best regards,
    Alexander

    Reply

  • Eric Villemure avatar

    Posted on May 25, 2012 (permalink)

    I have tested with version 2012.1.323 and it still does not work.

    I have tried to copy the App_GlobalResources folder to the precompiled folder but the web application will not start.

    Exception information:

        Exception type: HttpException

        Exception message: The directory '/App_GlobalResources/' is not allowed because the application is precompiled.

       at System.Web.Compilation.BuildManager.ReportTopLevelCompilationException()

       at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()

       at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)


    I am using a Grid with Ajax binding

    Can you provide a way to workaround this problem or fix it.  We are stuck with this issue and cannot think of a way to make it work.

    I have attached a screen shot that shows the problem

    Thank you
    Attached files

    Reply

  • Eric Villemure avatar

    Posted on May 29, 2012 (permalink)

    Any news on this.  Should I submit a support ticket?

    Reply

  • Daniel Daniel admin's avatar

    Posted on May 30, 2012 (permalink)

    Hello Eric,

    I reproduced the problem you wrote about. The resources are read and the elements that are rendered on the server are localized but the rest are not serialized and so the default text is displayed. We will investigate the what exactly is causing the problem and I will write back once there is more information.

    Kind regards,
    Daniel
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.

    Reply

  • Eric Villemure avatar

    Posted on Jun 4, 2012 (permalink)

    Hi Daniel is it fixed yet?

    Can you keep me updated because we need a solution before we release our next product version

    Thank you

    Reply

  • Daniel Daniel admin's avatar

    Posted on Jun 5, 2012 (permalink)

    Hello Eric,

    We have located the problem but it hasn't been fixed. I will attach a hotfix build to this thread as soon as it is ready.

    Regards,
    Daniel
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.

    Reply

  • Daniel Daniel admin's avatar

    Posted on Jun 7, 2012 (permalink)

    Hello Eric,

    I am glad to inform you that the problem has been resolved. The fix will be available in the next official release of the MVC Extenstions which is expected in the beginning of the next week.

    Regards,
    Daniel
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Telerik MVC Extensions (superseded) > General Discussions > Localization in precompiled application does not work