473,320 Members | 1,881 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.

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 4999
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: 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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.