Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 13, 2008 12:32 PM by kpomka
Feb 21, 2008 04:43 PM|LINK
Hi everybody. I wish someone can give me a hint on this, since I've been stuck on this for more than a week with no good results.
I’m involved in a large project for a medical infrastructure company that needs to process more than 5 million records. I can’t say more, but it’s a huge project.
At the Data Access Level (DAL) we already settled a fine architecture that interacts and processes the information in any way regardless of the platform that you use: either Web or Desktop based. At the Business Logic Layer, we skimmed what we needed in
order to provide all the security, transactional and workflow processes as well. At the Presentation Layer, we are mandated to provide the interfaces as Web User Controls, each of them independent of Language (culture).
So, what I am doing (I’m in charge of the Globalization and Localization process) is generating Web User Controls and creating their localizaed file_name.ascs.resx files.
And that’s the point: THEY DON’T WORK !
Actually, I can make ASPX pages work with the resx files when localizing implicitly. But when I port an ASPX page to an ASCX control, they don't work.
I’ve also seen a lot of literature stating that the best model for globalizing and localizing international apps is to use the Hub – Spoke Model and create Satellite Assemblies.
THERE ISN’T ANY EXAMPLE, step by step to do so, either.
So, my questions are:
1. How can you localize, using resx files, Web User controls?
2. How can you localize, using Satellite Assemblies, Web user controls and ASPX pages?
Please, be specific and concrete with detailed examples or links. No lame answers just to try to gain points here.
Web User Controls
Feb 21, 2008 06:29 PM|LINK
But when I port an ASPX page to an ASCX control, they don't work.
What do you mean by porting ASPX page to ASCX?
ASCX files localization work just like ASPX.
Refer this article:
Hope this helps,
Feb 22, 2008 08:19 PM|LINK
Hi Vivek and thank you for your reply:
Well, when I said "port an ASPX to an ASCX" is that actually I procede to create my Web User Controls in this way: I start a clean, from scratch aspx file and place all the controls that I need for my prospective Web User Control.
Obviously, I take away ANY HTML formating. Once I get the kind of appeareance that I expect from my ASCX control, all what I do is copy all the <asp: ...> </asp> code for each of the web controls that I rendered in the ASPX file.
I first test them as they are, which means: I don't create any resx file attached to it and rather test the ability of any aspx file to render the control. Most of the times, it works.
Once I confirm that the generated control that I created works, then I procede to do something simple: I try to generate the resx file directly from the "Tools->Generate Local Resource" command. This automatically creates the resource files for my control.
I can get the culture neutral resx file. But, when I try to create the localized versions, it doesn't work.
Let's say that I created a control called: MyControl.ascx, I generate the resx file automatically, which is placed in the "App_LocalResources" folder. I get the culture neutral resx file: MyControl.ascx.resx.
Accoording to the MSDN literature, all what I have to do is to copy the culture-neutral file and make the modifications needed to the other files. So, let's say that I need to do a localized version of the strings and messages for Spanish, Colombia (es-co).
What I have to do is copy the culture-neutral file, modify the strings with the Spanish Version of what we want to show, and name the file MyControl.ascx.es-co.resx.
Well, guess what: it doesn't work.
i even tried to put a higher level culture, like, spanish,: MyControl.ascx.es.resx. The funny thing is that sometimes it works, and sometimes it doesn't.
and we are in the middle of a bad moment here, since we have to localize it to 12 different languages, and my translators are breething in my @ss and I haven't been able to get a straight answer to this....
Thanks for reading this !
Web User Controls
May 13, 2008 12:32 PM|LINK
I was having the same problem.
I have user control and resx files for it.
And it didnt work.
But when i have cleaned up my web site files from Temporary ASP.NET Files folder it get works.
seems asp.net dont recompile resx files each time you change them.