473,657 Members | 2,380 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 6523
"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.Globaliz ation. 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********@dis cussions.micros oft.comschreef in bericht
news:08******** *************** ***********@mic rosoft.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.Globaliz ation. 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.Na me_of _the_res_you_ma de.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
3161
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 resource.rc file for each language, but then I need to use resource.r file in the execution and not in the compile time, can I do it? How ca I do it?. Thank you
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 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...
0
1301
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 resources folder, first i select a specific language culture. I need to set static content of controls dynamically using language specific resource file. At the time of execution, I am receiving the error "Could not find any resources...
1
4025
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 called DefaultResource.de.resx. However, I would like both of these files to live inside MyApi.dll. Inside MyApi.dll, I have a ResourceManager that is loaded using: new System.Resources.ResourceManager("MyNamespace.DefaultResource",...
13
3542
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 some javascript code that calls window.open. I pass the resource url of page B to Page A's window.open call. Page B is then loaded and executed but none of the server-side code is rendered. If I view the source of the page, the code (and page...
5
1221
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 the form. I am using initializeculture() to retrieve the user's preference from our database and to set the currentCulture and currentUICulture on the first load. It works well. However, we must supply a linkbutton named either Français or...
2
2002
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 for all my text on my website seems like the best way to go. I would just have a fr.resource file for each language. This seems like it would work pretty well. I have been able to create the .resource files but i do not know how to read them to...
2
3519
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 search resource file for this string id. After that I need to return translated string from other resouce file ? Is this best idea? Where to find sample code which implements this ?
12
5261
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
8394
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8306
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 we have to send another system
2
1615
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.