473,508 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Resource files / Language files

Hi,

we used to have a resource file in VB6 and use this as a provider according
to the language a user chose
(English, Dutch, Spanish,....), his interface thus.
In this resource file we had al labelcaptions, texts for messageboxes,
etc... stored,
so when the user chose for an interface in English all menu's etc.. were in
English...

In VB2005 though we would like to show the interface in the language of his
Windows XP SP2,
so if he has an English version, we would open our VB 2005 program and show
all dialogs and menu's in English,
if he has a Dutch Windows we would open the same program with a Dutch
interface.

This gives me trouble twice in VB2005,
first : how do I detect the language of one's Windows ?
second : what about resource files, what happened to them, and how do I
change the interface now... ?

Thanks for helping

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
Sep 27 '07 #1
2 6509
"Screaming Eagles 101" wrote:
....
This gives me trouble twice in VB2005,
first : how do I detect the language of one's Windows ?
second : what about resource files, what happened to them, and how do I
change the interface now... ?

Thanks for helping

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
To detect the user's prefered language, please have a look at
System.Globalization. The class CultureInfo has many interesting properties
that may be helpful.

I never worked with resource files in VB6, so I dont know much about their
purpose. But I have done a small international application and used my own
VB.Net resource file to store strings in different languages so I think the
concept must be the same. To add a resource to your project, go to the menu
'project' and select '... properties ...' (usually the last entry). On the
left, choose the tab 'Resources'. You can add images, sounds, text files or
other files. After adding a text file you can edit the text file just by
double clicking it in the Soultion Explorer Window.

Text file resources are treated as one giant string in VB.Net. You can use
something like 'My.Resources. ...' to get the content. To extract the single
strings out of this giant string you can use the string.split method.
Important note: My experiences with VB.Net are limited to the Express
Edition. More advanced Editions may provide much better tools to develop
multi language applications.
Sep 27 '07 #2
"Oliver Tell" <Ol********@discussions.microsoft.comschreef in bericht
news:08**********************************@microsof t.com...
"Screaming Eagles 101" wrote:
...
>This gives me trouble twice in VB2005,
first : how do I detect the language of one's Windows ?
second : what about resource files, what happened to them, and how do I
change the interface now... ?

Thanks for helping

--
Filip
http://www.ww2airborne.net/
Official Site of the 101st Airborne - 463rd PFA
skype: airborne463pfa-fiwi
[It's nice to be important, but it's more important to be nice!]
----------------------------------------------------------------
To detect the user's prefered language, please have a look at
System.Globalization. The class CultureInfo has many interesting
properties
that may be helpful.

I never worked with resource files in VB6, so I dont know much about their
purpose. But I have done a small international application and used my own
VB.Net resource file to store strings in different languages so I think
the
concept must be the same. To add a resource to your project, go to the
menu
'project' and select '... properties ...' (usually the last entry). On the
left, choose the tab 'Resources'. You can add images, sounds, text files
or
other files. After adding a text file you can edit the text file just by
double clicking it in the Soultion Explorer Window.

Text file resources are treated as one giant string in VB.Net. You can use
something like 'My.Resources. ...' to get the content. To extract the
single
strings out of this giant string you can use the string.split method.
Important note: My experiences with VB.Net are limited to the Express
Edition. More advanced Editions may provide much better tools to develop
multi language applications.
Thanks
I see : Through Add New Item one can add a resource file
and get items through My.Resources.Name_of _the_res_you_made.Your_item.
I'll try to do something with this...
Sep 28 '07 #3

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

Similar topics

1
3146
by: Kaworu | last post by:
Hi, at first time I want to apologize for my English. I need to change the language of my app and I like to do it changin the caption of the controls in the resource.rc file, or having on...
2
829
by: JollyK | last post by:
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...
0
1286
by: vivek | last post by:
localization of lang. using resource files resides in the global resources folder (App_GlobalResources). Currently In my application, I need to have different language resource files in global...
1
4018
by: scpedicini | last post by:
Let's say that I've built an assembly called MyApi.dll with two different language resource files, one called DefaultResource.resx (which is my english resource file), and a german resource file...
13
3515
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...
5
1214
by: =?Utf-8?B?Unlhbg==?= | last post by:
Hello, I have what I thought was a simple problem, and perhaps there is still a simple solution. I have a page that is using local resource files to store all the necessary control properties on...
2
1997
by: Daniel | last post by:
I am just investigating on .resx and .resource files using asp.net. I am attempting to develop a webpage in Dreamweaver on an asp.net webserver. As i read around the net, using a .resource file...
2
3507
by: Andrus | last post by:
I have resource files in different languages created by VCS 2005 Express. I want to use those files to translate reports at runtime. I have text to be translated as string. I think I need to...
12
5242
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
7227
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
7331
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
7391
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
5633
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,...
1
5056
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...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
768
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.