Resource files / Language files

  • Thread starter Screaming Eagles 101
  • Start date
S

Screaming Eagles 101

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!]
----------------------------------------------------------------
 
G

Guest

:
....
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.
 
S

Screaming Eagles 101

Oliver Tell said:
:
...
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top