473,322 Members | 1,614 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,322 software developers and data experts.

Easier way to add entries into Resource file?

Hi, so what can be done about this.
I am retrieving custom display messages from the culture specific
resource files through ResourceManager. But I have about 20 differnt
languages, so whenever i add a new display message, i have to add 20
new entries in 20 different resource files. Does anyone have a
recommendation of how to automate this process, or in general a
overall better way to accomplish this desired functionality.
Thanks
Jul 21 '05 #1
2 1153
A little .net app could easily have this automated right - so where do you
find a problem?

- Rakesh

<jw*****@gmail.com> wrote in message
news:d3**************************@posting.google.c om...
Hi, so what can be done about this.
I am retrieving custom display messages from the culture specific
resource files through ResourceManager. But I have about 20 differnt
languages, so whenever i add a new display message, i have to add 20
new entries in 20 different resource files. Does anyone have a
recommendation of how to automate this process, or in general a
overall better way to accomplish this desired functionality.
Thanks

Jul 21 '05 #2
I would move my Resources to a Database if I were you.

Make two tables:
Table 1(My_Culture_Messages)
Table 2(My_Culture_Languges)

My_Culture_Messages:
MSG_ID - int - Length 4 - NOT NULL
LNG_ID - int - Length 4 - NOT NULL
MSG - nvarchar - Length 1024(or whatever length you think is max) - NOT NULL
- DEFAULT('')

My_Culture_Languges:
LNG_ID - int - Length 4 - NOT NULL - Seed 1
LNG_NAME - nvarchar - Length 255 - NOT NULL - DEFAULT('')

Example of the two tables :

My_Culture_Messages:
MSG_ID | LNG_ID | MSG
100 | 1 | Hello, how are you?
100 | 2 | Hejsan, hur 'a'r det med dig?
101 | 1 | Cancel
101 | 2 | Avbryt
102 | 1 | An error occured, please contact your Administrator

My_Culture_Languges:
LNG_ID | LNG_NAME
1 | English
2 | Swedish
You can easily make scripts that adds Empty strings for the other languges,
when adding a New string(i.e. New MSG_ID that doesnt exist). Or just do a
check if that string exist in the language you have specified. If it doesnt
exist(like MSG_ID 102 in the example above there is no Swedish version), just
return empty string or maybe you have set a default language that it will
take instead.

Currently working with multiple language myself and I found this solution
alot better than using Resource files.

Best Wishes,
Farek

"jw*****@gmail.com" wrote:
Hi, so what can be done about this.
I am retrieving custom display messages from the culture specific
resource files through ResourceManager. But I have about 20 differnt
languages, so whenever i add a new display message, i have to add 20
new entries in 20 different resource files. Does anyone have a
recommendation of how to automate this process, or in general a
overall better way to accomplish this desired functionality.
Thanks

Jul 21 '05 #3

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

Similar topics

8
by: Richard Sherratt | last post by:
It's a database keeping info about people and is expected to contain 20,000 to 25,000 people. I could put a GoToPerson Combo on the form, but the customer and I are not to keen on that. It makes...
0
by: JezB | last post by:
Given a resource file, is there any way to loop through all the entries in that resource file ?
1
by: Namratha Shah \(Nasha\) | last post by:
Hi All, This is a resource file generation tool which converts an xml based resource formats to .net resource file i.e. (.resources) and vice-versa. Today we will see how we will generate ...
2
by: Joe Thompson | last post by:
Hi, I am trying to use PlaySound in a VC++.net Windows app (VS 2003). I can use it to play a file but now I want to play it from a resource. I have two questions: How do I add a wav file to...
1
by: David Laub | last post by:
Visual Studio .net 2003 automatically creates resx files with three entries in them. What I don't understand is: 1) sometimes additional entries are automatically placed in the resx file, and I...
2
by: jw56578 | last post by:
Hi, so what can be done about this. I am retrieving custom display messages from the culture specific resource files through ResourceManager. But I have about 20 differnt languages, so whenever i...
9
by: Suman | last post by:
Happy Friday everyone!!! I am working on a windows service and a C# application and needed some help with certain functionality. Please read through my issue below. Thanks! I have a windows...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
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...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
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: 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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.