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

How do u handle multi-language resource files

Hello friends,

In a large asp.net project, I don't think it is a good idea for having one
common resource file containing all localized strings for the whole
application. I think a better approach would be to have individual resx
files for each form/user control.
My main problem is having difficulties in naming my resource file.
For example, suppose I have a web form called Items.aspx. I want to have a
resource file for it and name it Items.resx, but Visual Studio.net will show
an error during compilation mentioning...
Resources 'Items.aspx.resx' and 'Items.resx' have the same manifest resource
name '<Namespace>.Items.resources'.

The reason for this error is cause Visual Studio.net will always create a
resource file called 'Items.aspx.resx' automatically. Even if I delete this
autogenerated file, Visual Studio.net will re-create it. So what is
happening is that 'Items.aspx.resx' and 'Items.resx' are both clashing.

How do I solve this issue because I would like to also have a resource file
in a french version named Items.fr-ca.resx.

I would also like to hear a discussion on what would be the best approach to
deal with multi-language resource files.

Thanks..

JK
Nov 18 '05 #1
4 5003
There are certain things where it is better to give in and do it the way MS
wants you to, which is the pageName.aspx.resx, even if you have to delete
and then drop your file in with the same name. MS does listen to feedback
and will change things over time, but you are often stuck to begin with.

If you are really stuck on having the file Images.resx, here is an idea to
try. Not sure if it will work, but it is the best shot.

1. Open ProjectName.vbproj (VB.NET) or ProjectName.csproj (C#) in notepad
2. Find the name of the resx file (the default name pageName.aspx.resx) and
change to the name you desire
3. Drop your file in the folder.
4. Open the project

The test will likely come when you add the French language file. I would do
this ASAP to see if this solution will work. If not, you are back to
pageName.aspx.resx.

If it works, post a followup.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"JollyK" <Jo****@email.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
Hello friends,

In a large asp.net project, I don't think it is a good idea for having one
common resource file containing all localized strings for the whole
application. I think a better approach would be to have individual resx
files for each form/user control.
My main problem is having difficulties in naming my resource file.
For example, suppose I have a web form called Items.aspx. I want to have a
resource file for it and name it Items.resx, but Visual Studio.net will show an error during compilation mentioning...
Resources 'Items.aspx.resx' and 'Items.resx' have the same manifest resource name '<Namespace>.Items.resources'.

The reason for this error is cause Visual Studio.net will always create a
resource file called 'Items.aspx.resx' automatically. Even if I delete this autogenerated file, Visual Studio.net will re-create it. So what is
happening is that 'Items.aspx.resx' and 'Items.resx' are both clashing.

How do I solve this issue because I would like to also have a resource file in a french version named Items.fr-ca.resx.

I would also like to hear a discussion on what would be the best approach to deal with multi-language resource files.

Thanks..

JK

Nov 18 '05 #2
There are certain things where it is better to give in and do it the way MS
wants you to, which is the pageName.aspx.resx, even if you have to delete
and then drop your file in with the same name. MS does listen to feedback
and will change things over time, but you are often stuck to begin with.

If you are really stuck on having the file Images.resx, here is an idea to
try. Not sure if it will work, but it is the best shot.

1. Open ProjectName.vbproj (VB.NET) or ProjectName.csproj (C#) in notepad
2. Find the name of the resx file (the default name pageName.aspx.resx) and
change to the name you desire
3. Drop your file in the folder.
4. Open the project

The test will likely come when you add the French language file. I would do
this ASAP to see if this solution will work. If not, you are back to
pageName.aspx.resx.

If it works, post a followup.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"JollyK" <Jo****@email.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
Hello friends,

In a large asp.net project, I don't think it is a good idea for having one
common resource file containing all localized strings for the whole
application. I think a better approach would be to have individual resx
files for each form/user control.
My main problem is having difficulties in naming my resource file.
For example, suppose I have a web form called Items.aspx. I want to have a
resource file for it and name it Items.resx, but Visual Studio.net will show an error during compilation mentioning...
Resources 'Items.aspx.resx' and 'Items.resx' have the same manifest resource name '<Namespace>.Items.resources'.

The reason for this error is cause Visual Studio.net will always create a
resource file called 'Items.aspx.resx' automatically. Even if I delete this autogenerated file, Visual Studio.net will re-create it. So what is
happening is that 'Items.aspx.resx' and 'Items.resx' are both clashing.

How do I solve this issue because I would like to also have a resource file in a french version named Items.fr-ca.resx.

I would also like to hear a discussion on what would be the best approach to deal with multi-language resource files.

Thanks..

JK

Nov 18 '05 #3
Hello Greg,
Your solution is very interesting, but it is not working because if I change
the name of the file in the .csproj(C#) file, VS.NET will recreate a brand
new file with aspx.resx extention.

"Cowboy (Gregory A. Beamer) [MVP]" <No************@comcast.netNoSpamM> wrote
in message news:u8**************@TK2MSFTNGP11.phx.gbl...
There are certain things where it is better to give in and do it the way MS wants you to, which is the pageName.aspx.resx, even if you have to delete
and then drop your file in with the same name. MS does listen to feedback
and will change things over time, but you are often stuck to begin with.

If you are really stuck on having the file Images.resx, here is an idea to
try. Not sure if it will work, but it is the best shot.

1. Open ProjectName.vbproj (VB.NET) or ProjectName.csproj (C#) in notepad
2. Find the name of the resx file (the default name pageName.aspx.resx) and change to the name you desire
3. Drop your file in the folder.
4. Open the project

The test will likely come when you add the French language file. I would do this ASAP to see if this solution will work. If not, you are back to
pageName.aspx.resx.

If it works, post a followup.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"JollyK" <Jo****@email.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
Hello friends,

In a large asp.net project, I don't think it is a good idea for having one common resource file containing all localized strings for the whole
application. I think a better approach would be to have individual resx
files for each form/user control.
My main problem is having difficulties in naming my resource file.
For example, suppose I have a web form called Items.aspx. I want to have a resource file for it and name it Items.resx, but Visual Studio.net will show
an error during compilation mentioning...
Resources 'Items.aspx.resx' and 'Items.resx' have the same manifest

resource
name '<Namespace>.Items.resources'.

The reason for this error is cause Visual Studio.net will always create a resource file called 'Items.aspx.resx' automatically. Even if I delete

this
autogenerated file, Visual Studio.net will re-create it. So what is
happening is that 'Items.aspx.resx' and 'Items.resx' are both clashing.

How do I solve this issue because I would like to also have a resource

file
in a french version named Items.fr-ca.resx.

I would also like to hear a discussion on what would be the best

approach to
deal with multi-language resource files.

Thanks..

JK


Nov 18 '05 #4
Hello Greg,
Your solution is very interesting, but it is not working because if I change
the name of the file in the .csproj(C#) file, VS.NET will recreate a brand
new file with aspx.resx extention.

"Cowboy (Gregory A. Beamer) [MVP]" <No************@comcast.netNoSpamM> wrote
in message news:u8**************@TK2MSFTNGP11.phx.gbl...
There are certain things where it is better to give in and do it the way MS wants you to, which is the pageName.aspx.resx, even if you have to delete
and then drop your file in with the same name. MS does listen to feedback
and will change things over time, but you are often stuck to begin with.

If you are really stuck on having the file Images.resx, here is an idea to
try. Not sure if it will work, but it is the best shot.

1. Open ProjectName.vbproj (VB.NET) or ProjectName.csproj (C#) in notepad
2. Find the name of the resx file (the default name pageName.aspx.resx) and change to the name you desire
3. Drop your file in the folder.
4. Open the project

The test will likely come when you add the French language file. I would do this ASAP to see if this solution will work. If not, you are back to
pageName.aspx.resx.

If it works, post a followup.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************** *************
Think outside the box!
************************************************** *************
"JollyK" <Jo****@email.com> wrote in message
news:Oh**************@TK2MSFTNGP11.phx.gbl...
Hello friends,

In a large asp.net project, I don't think it is a good idea for having one common resource file containing all localized strings for the whole
application. I think a better approach would be to have individual resx
files for each form/user control.
My main problem is having difficulties in naming my resource file.
For example, suppose I have a web form called Items.aspx. I want to have a resource file for it and name it Items.resx, but Visual Studio.net will show
an error during compilation mentioning...
Resources 'Items.aspx.resx' and 'Items.resx' have the same manifest

resource
name '<Namespace>.Items.resources'.

The reason for this error is cause Visual Studio.net will always create a resource file called 'Items.aspx.resx' automatically. Even if I delete

this
autogenerated file, Visual Studio.net will re-create it. So what is
happening is that 'Items.aspx.resx' and 'Items.resx' are both clashing.

How do I solve this issue because I would like to also have a resource

file
in a french version named Items.fr-ca.resx.

I would also like to hear a discussion on what would be the best

approach to
deal with multi-language resource files.

Thanks..

JK


Nov 18 '05 #5

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

Similar topics

1
by: Jinlin | last post by:
I found a interesting problem in C# and couldn't explain it. The code to reproduce it is very simple: 1. Create a windows application in C#. 2. Listen to the activated event on the default form...
2
by: Simon Niederberger | last post by:
Hi I've written a Windows Service which has - several (0-100) listeners threads which spawn worker threads based on events, timers etc - several (0-300) worker threads which handle data...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
2
by: lucy | last post by:
Hi, I'm working on a multi-threading web application. I'm using Application_Error event to write exception detail to windows event log to help debug. It seems exception happened in the second...
12
by: Aaron Smith | last post by:
What is the best way to handle data in a multiple user environment? We have forms that will allow users to add edit and delete data from a table on SQL server. The data could be edited on multiple...
3
by: Basel | last post by:
Hi All I'm using SetConsoleCtrlHandler to handle Ctrl-C event. But I have a problem using it in multi-threaded applications (it doesn't invoke handler function). What is the correct way to...
1
by: rapin | last post by:
How do you make javascript’s string functions (like toUpperCase() or substr()) run under SpiderMonkey to handle multi-byte characters. For example: var strTest = "ørnen på"; var ...
4
by: Rui Maciel | last post by:
I want to support Unicode on a pet project of mine (small markup language parser). I've read a bit about Unicode (didn't delved beyond the basics) and I searched for some info on how to support...
8
by: dmoore | last post by:
Hi folks, I've seen the following issue come up in multiple posts to this mailing list: I have a python program that spawns a child process with popen or popen2 or popen3 or popen2.popen2...
4
by: MartinRinehart | last post by:
Thinking about unclosed multi-line quotes. When you open a multi-line quote (type '"""') what does your editor do? Does it color the remainder of your text as a quote, or does it color the line...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.