473,395 Members | 1,613 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C# Web App: Globalising Web App

55
Hi all,

I need to globalise my web app from english into french. I have created a .resx resource file for both languages but now am unsure of a way of setiing which resource file is to be used. For example:

A French user logs on to the application, when the page loads for him I need the resource file to point to the french one so all label.text descriptions are brought from the correct file using the GetString format.

Hope you can help me :)

Many thanks in advance.
Sep 19 '08 #1
2 1033
balabaster
797 Expert 512MB
Simplest way is to grab the current culture when the user logs in or starts the application. Your strings file can be read with My.Resources.FileName, so depending on the culture, just change the reference to the file name. I've included some pseudo code that should kind of work...with a bit of tweaking...

Expand|Select|Wrap|Line Numbers
  1. string resFile;
  2. switch(System.Globalization.CultureInfo.CurrentCulture){
  3.   case <French> :
  4.     resFile = My.Resources.French;
  5.     break;
  6.   default :
  7.     resFile = My.Resources.English;
  8.     break;
  9. }
Then you'd have a function to parse each file for the correct string...
Sep 19 '08 #2
dmj07
55
Many thanks for your reply, I will have to have a go with this psuedo code see if i can implement it :)
Sep 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not...
3
by: Brad Burke | last post by:
From a windows .Net app, I need to 1) check if MSAccess is already open to a certain Access application. If so, then open a form and find a certain record. 2) If not open, then open MSAccess and...
5
by: Paul Daly (MCP) | last post by:
I've created a windows forms appliation that gets its data from a sql database. I want to create an app.config file for this application so that in the event that the server name changes, they...
14
by: Salad | last post by:
On the computer side of the businees there is me, the developer. Another person's role is that of the idea man...the person that knows the business and requirements and issues for the business. ...
2
by: Ray Dillinger | last post by:
Okay, most of my career has been spent doing linguistics or hardcore math, and letting other people write the interfaces to it. Now I'm up for something a little different and I need to expand my...
3
by: .NET Follower | last post by:
hi, has anyone tried out globalising their applications in diff languages specially indian languages.... -- Thanks and Regards,
3
by: John Dalberg | last post by:
I am setting the HttpContext.Current.User in the Application_AuthenticateRequest event in global.asax.cs. When I use the IsInRole function in a web page, it works fine. So far so good. (Note that...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
12
by: Dilip | last post by:
Hi All I have a server based C# console application. This application must hide its console window when its launched out on the field. So I dutifully P/Invoke'd FindWindow/ShowWindow...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.