This is a migrated thread and some comments may be shown as answers.

Localization in precompiled application does not work

15 Answers 302 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 19 May 2011, 02:53 PM
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?

15 Answers, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 23 May 2011, 01:53 PM
Could someone show me a direction of searching at least?
0
nachid
Top achievements
Rank 1
answered on 23 May 2011, 03:04 PM
Have you checked that you have your App_GlobalResources folder containing all your resources files
0
Alex
Top achievements
Rank 1
answered on 24 May 2011, 04:05 AM
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.
0
nachid
Top achievements
Rank 1
answered on 24 May 2011, 08:15 AM
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.
0
Alex
Top achievements
Rank 1
answered on 24 May 2011, 08:27 AM
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?
0
Accepted
Nikolay Rusev
Telerik team
answered on 24 May 2011, 12:57 PM
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
0
Alex
Top achievements
Rank 1
answered on 24 May 2011, 01:17 PM
Thanks for answer, Nikolay. It means that I am not mad at least. When are you going to make next release?
0
Sebastian
Telerik team
answered on 24 May 2011, 02:33 PM
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
0
Alexander
Top achievements
Rank 1
answered on 24 Aug 2011, 04:23 PM
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
0
Eric Villemure
Top achievements
Rank 1
answered on 25 May 2012, 04:34 PM
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
0
Eric Villemure
Top achievements
Rank 1
answered on 29 May 2012, 07:53 PM
Any news on this.  Should I submit a support ticket?
0
Daniel
Telerik team
answered on 30 May 2012, 03:50 PM
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.
0
Eric Villemure
Top achievements
Rank 1
answered on 04 Jun 2012, 05:41 PM
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
0
Daniel
Telerik team
answered on 05 Jun 2012, 02:20 PM
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.
0
Daniel
Telerik team
answered on 07 Jun 2012, 02:47 PM
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.
Tags
General Discussions
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
nachid
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Sebastian
Telerik team
Alexander
Top achievements
Rank 1
Eric Villemure
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or