473,320 Members | 2,094 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,320 software developers and data experts.

Help with Localization

Hi,

I'm trying to develop an ASPX page that supports multiple languages.
Everything has gone well till now -

1. Created a project in VS.NET 2003
2. Added 2 resource files named Captions.resx and Captions.fr.resx for
English and French cultures respectively
3. Used the following code in the ASPX Code Behind file

resourceManager = new ResourceManager("MyProject.Captions",
Assembly.GetExecutingAssembly());
this.Label.Text = resourceManager.GetString("LABEL_CAPTION");

4. Compiled the project in VS.NET 2003. The page loads fine with the
label's caption set to English or French (depending on the Culture)

Now the problem

Since I plan to support more languages and there are going to be more
resource files (per language, per category etc), I would like to organize
them into several directories. So, I moved both my resource files into a
"Resources" directory and recompiled the project - BOOM - get a runtime
error saying:

"Could not find any resources appropriate for the specified culture (or the
neutral culture) in the given assembly. Make sure
"MyProject.Captions.resources" was correctly embedded or linked into
assembly "MyProject". baseName: MyProject.Captions locationInfo: <null>
resource file name: MyProject.Captions.resources assembly: MyProject,
Version=1.0.1361.33724, Culture=neutral, PublicKeyToken=null "

I guess the problem is due to the fact that VS.NET is unable to locate the
resx files during compilation. How do I fix this problem? Any help in this
matter is greatly appreciated.

CGuy
Jul 21 '05 #1
1 1475
Actually I believe the VS project system is including the directory name
into the resource name. So I would change your code correspondingly:
resourceManager = new
ResourceManager("MyProject.Resources.Captions",
Assembly.GetExecutingAssembly());
--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Amin Schoeib | last post by:
Hi, I am a Postgres newbie who worked until now with Oracle. Now I want to know if it is possible (when yes the how?) in Postgresql To set dynamically the Localization? For example in Oracle you...
1
by: KMILO | last post by:
Hello, Thanks ins advance for reading my message Im trying to use many .resx files for different webforms when I try to the project the following error appears: Could not find any resources...
2
by: Paul M | last post by:
Hi there, can anyone help me with this one.... i have a page which is in normal english format, but when i wanna change it to Russian format text, i set the Culture code, but it still remains...
6
by: Rental | last post by:
I'm having the sam problem as described below with the Localization toolkit. Does anyone know if there is a solution to this problem. --->When attempting to generate resource dlls with...
5
by: CMM | last post by:
I don't seem to "get" ASP.NET 2.0's Localization features. I've read up on everything... and of course, everything is explained in cursory softball terms- not any "real-world" usage way. I hope...
5
by: archana | last post by:
Hi all, I am having confusion regarding localization in .net. I have one form on which i have some labels and button. After designing that form what i did is set localization property of form...
2
by: bruno | last post by:
I need to localize my ASP.NET app and I just used "Tools" --"generate local resources" command and everything works fine in my WebForms. Resource file name is: MyWebForm.aspx.resx under a subDir...
3
by: Corey B | last post by:
I have an ASP.NET application that was built in ASP.NET v1.1. It has a SQL Server back end database. I have been asked to provide an estimate for the level of effort required to produce a Chinese...
3
by: Computer Guru | last post by:
I have a VB.NET 2005 application with several forms and a couple hundred "strings." I've been looking into all the localization improvements in VB.NET, and I can't seem to find anything that...
1
by: 2310b | last post by:
I have a web form in which i use OnPreRender to load controls. it works fine BUT no matter what other events I call, the OnPreRender keeps executing. If I click on one of the buttons to fire off...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.