473,395 Members | 2,783 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.

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
Nov 17 '05 #1
2 1448
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.
Nov 17 '05 #2
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.
Nov 17 '05 #3

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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.