![microsoft visual basic for applications localized microsoft visual basic for applications localized](http://helpcentral.componentone.com/nethelp/ARNET3/Images/ar3wlkLocalizeWebViewerControl.gif)
- #Microsoft visual basic for applications localized code
- #Microsoft visual basic for applications localized windows
To switch to the Properties window, press the F4 key. Click on the OK button to close the Add New Item dialog box.Ģ. Type the name of the new form as Form2.vb.
#Microsoft visual basic for applications localized windows
In the Add New Item dialog box, ensure that Windows Form is selected in the Templates pane. From the Project menu, choose the Add Windows Form command. You need to perform the following steps to create a localized form based on the user selection:ġ. The constructor of Form2 takes the Culture string as a parameter.
#Microsoft visual basic for applications localized code
The preceding code assigns the value en-US or fr-FR to the string, based on the user selection after declaring a string variable. Type the following code in the Click event of the btnOK button. Type the following code in the Form1_Load() event handler to populate the combo box:Ĭ("French (France)") 7. Change the Name property of the control to btnOK. Create a button and set its Text property as ok. Create a combo box and set its Name property as Combo1. Create a label and set its Text property as Select Language. This adds the form Form1 to the project automatically. Click on the OK button to close the New Project dialog box. Enter the name of the project as Localization. From the Templates pane, select Windows Application. Select Visual Basic Project templates from the Project Types pane in the New Project dialog box. To create the application, you need to perform the following steps:ġ. You will now learn to create an application that accepts the culture preference from a user and displays the form's text in the language specific to that culture. For example, to create a localized version of a form named Formi for the language French (France), the name of the resource file will be. The resource file's name contains the name of the culture. For each localized version of the form, additional resource files are created. This file contains the strings and resources in the language in which the application is developed. The file name is the same as that of the form and the extension RESX.
![microsoft visual basic for applications localized microsoft visual basic for applications localized](http://www.productinfo.schaudin.com/Images/ObjectModel.jpg)
The Visual Studio.NET project system automatically adds a neutral resource file to the project when the Localizable property is set to True. Visual Basic.NET provides the Localizable property for Windows forms to create localized applications. As previously discussed, all the text and localizable resources are kept in resource files. You can create a localized version of an application without modifying the application code.