Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Localization in Visual studio 2.0

Posted on 2006-06-13
4
Medium Priority
?
724 Views
Last Modified: 2008-01-09
Environment : Visual studio 2005 C#
Topic : Localization, Resource Files

Question:
I have created a web site and added a page "Sample.aspx" which has 4 labels.
I want to change the text of the labels according to the specific Locale at runtime.

Using
.resx files stored in "App_LocalResources"

and

Thread.CurrentThread.CurrentUICulture = new CultureInfo("ar-ae");
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("ar-ae");

the code works fine.

Now I want to put this .resx files in different folders instead of "App_LocalResources"
for e.g. "sample.aspx.en-gb.resx" in "EN" folder
"sample.aspx.ar-ae.resx" in "AR" folder

Also the .resx files should be editable after deployment.

Can anybody help me doing this functionality

0
Comment
Question by:ap_sajith
  • 2
3 Comments
 
LVL 14

Expert Comment

by:existenz2
ID: 16900805
Have a look at: http://aspalliance.com/726

This answers all your questions and gives you a nice and tidy solution.
0
 
LVL 14

Accepted Solution

by:
existenz2 earned 2000 total points
ID: 16900810
Sorry wrong url. I meant:
http://www.ondotnet.com/pub/a/dotnet/2005/08/08/localizingaspnet20.html
http://aspalliance.com/426

You can create special resource assemblies. This allows you to edit the files after deployment without have to build the whole solution again.
0
 
LVL 21

Author Comment

by:ap_sajith
ID: 17067746
Apologies... Missed out on closing off the Q.

Cheers!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question