Vyoms OneStopTesting.com - Testing EBooks, Tutorials, Articles, Jobs, Training Institutes etc.
OneStopGate.com - Gate EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopMBA.com - MBA EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopIAS.com - IAS EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopSAP.com - SAP EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopGRE.com - of GRE EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
Bookmark and Share Rss Feeds

Localization in COBOL .NET | Articles | Recent Articles | News Article | Interesting Articles | Technology Articles | Articles On Education | Articles On Corporate | Company Articles | College Articles | Articles on Recession
Sponsored Ads
Hot Jobs
Fresher Jobs
Experienced Jobs
Government Jobs
Walkin Jobs
Placement Section
Company Profiles
Interview Questions
Placement Papers
Resources @ VYOMS
Companies In India
Consultants In India
Colleges In India
Exams In India
Latest Results
Notifications In India
Call Centers In India
Training Institutes In India
Job Communities In India
Courses In India
Jobs by Keyskills
Jobs by Functional Areas
Learn @ VYOMS
GATE Preparation
GRE Preparation
GMAT Preparation
IAS Preparation
SAP Preparation
Testing Preparation
MBA Preparation
News @ VYOMS
Freshers News
Job Articles
Latest News
India News Network
Interview Ebook
Get 30,000+ Interview Questions & Answers in an eBook.
Interview Success Kit - Get Success in Job Interviews
  • 30,000+ Interview Questions
  • Most Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades

VYOMS TOP EMPLOYERS

Wipro Technologies
Tata Consultancy Services
Accenture
IBM
Satyam
Genpact
Cognizant Technologies

Home » Articles » Localization in COBOL .NET

Localization in COBOL .NET








Article Posted On Date : Monday, March 26, 2012


Localization in COBOL .NET
Advertisements

Overview

Do you create applications for use in multiple locations and languages? This article will show you how to use the power of LOCALIZATION within Visual Studio .NET to create one screen and have it display different languages. The source code was created with Microsoft Visual Studio.NET 2003 and Fujitsu NetCOBOL for .NET V2.0.

Background

With many companies being multi-national, developers are having to create applications not only in their native language, but also in languages for the countries in which their company has offices. And many times these additional languages present unique challenges due to the presence of local variants to the base language. In the past developers created the application in their language and copied the application to a new name and changed the presentation to the language where the application was going to be deployed. This resulted in having the same program exist for different languages, same core logic, but different presentation layer.

Through the use LOCALIZATION in Visual Studio.NET you can now create one code-base and have multiple presentation layers in different languages use the same code-base. Our example will use a simple WinForm that will enable you to view a screen in either English or German. Please remember though, the intent of the article is to show you how to enable multiple languages, and not present you with a completed application.

Our application has two screens. An Introductory screen:

and a presentation screen:

It is the presentation screen that we will enhance to display in German. We will not go into the specifics how to create a WinForm application using NetCOBOL for .NET. Please refer to the online documentation for assistance.

Multi-Language Capabilities

Microsoft has enabled multi-language capabilities within Visual Studio.NET via a combination of the LOCALIZABLE and LANGUAGE settings for the Form you are working on. By default your language setting is set to the the local area where you are. By changing these variables you can create language targeted screens.

Within Visual Studio.NET 2003 there are two ways to create a foreign language representation of your screens. One way is to use the utility "WINRES" and the other is to use the Designer. I chose to use the Designer so I can visually see what the changes will be to my screen and if any additional enhancements to the form will be required by changing the text being displayed. You begin by selecting your Form and reviewing the properties, looking under the Misc area for the LOCALIZABLE and LANGUAGE settings as such:

Notice the LANGUAGE and LOCALIZABLE settings are set to English(United States) and True respectively.  I want to create a form in German though so we need to change the LANGUAGE to Germany (Germany) by using the drop-down list. Notice the different versions of German available to you? You can target the specific dialect of a language by first reviewing the options available to you and then selecting the closest version of that language.

For further information on what language settings are available see the CultureInfo Class in the .NET Framework help.

 When you select a new language you will notice the creation of several new files in the Solution Explorer. These files are XML based project files that will contain the language specific items for the screen.  The following image shows the files:

The red box is highlighting the two new files that were created when we selected the German language from the drop-down list in the form properties. If you were to look at these files in VS.NET you will see they appear as spreadsheets with the name, value and other pieces of information necessary for VS.NET to display the new values. Take a moment and review the files in the solution provided. You will see the values for the labels already present.

What VS.NET did was create a copy of the original screen, with all the objects on it, and provide you with a formatted way in which to change the language to German. You have the original screen to use as a guide so you know what it is you are changing and where, instead of trying to change something in a spreadsheet styled display. Using the Designer to create the foreign language version of your screen enables you to see what it looks like as you are changing it. This permits you to see right away if changes to the text will require the size of the labels to change, which you can do right away since you are already in the Designer!

Select the Form and change the LANGUAGE back to English(United States). Notice the Designer does not load a new form, but merely updates the existing form with the new language settings from the RESX file for English(United States).

The Driver Program

Since I do not want to change the code page my computer is using I created the driver program to demonstrate the use of the multi-language capabilities. The driver program, FORM1.COB, has two methods (one for each click event of the command buttons) that set a variable, create a new Globalization instantiation and finally show the form using the new Globalization instance. Since both methods are relatively the same I will show the German method:

CLASS-DEMO was established in the REPOSITORY as a reference to the DEMO form. We instantiate the form, passing it a flag telling it which language we want to use and then show the form. The real secret is in the "NEW"  method of the DEMO class.

Enablement

An overloaded "NEW" method was created in the DEMO program.

The original "NEW" method is shown for comparison. Two variables were added, an object reference to the CULTUREINFO class (objGlobalization) and a LINKAGE parameter to accept the value being passed from the driver program (LNK-LANG-IND).

The language indicator being passed in is evaluated. The values used for the instantiation of the CultureInfo class were determined from the documentation and from the value created for the RESX files. The properties for the CURRENTCULTURE and CURRENTUICULTURE must be set to the new culture info we established prior to invoking the InitializeComponent method. When the form is displayed, depending on which language was selected will determine which form is displayed. Windows will now display the proper information for the correct language.

Wrap-Up

That's it. Once you see how it is done the process is so simple, yet very, very efficient and effective! Unzip the source file, rebuild the solution and execute the process without debugging the first time so you see what is displayed. Next step into the code and visually see what is occurring. Finally, and this should put everything into perspective for you, select the English language in the LANGUAGE property, then select a new language, say Italian. Notice the files that are created and then modify the screen in the Designer to say 'Italian' instead of 'German'. Then add a button to the driver program to call your new Italian screen. Finally update the overloaded "NEW" method to create an Italian instantiation of the CultureInfo class, recompile the solution and see what happens.

Maintenance Note: Once you have created the new screens you can provide a translator or someone familiar with the local language, the spreadsheet representation of your screen and they can 'tweak and tune' the language to be more accurate. You can maintain the specific language items in either the spreadsheet format or the Designer. 






Sponsored Ads



Interview Questions
HR Interview Questions
Testing Interview Questions
SAP Interview Questions
Business Intelligence Interview Questions
Call Center Interview Questions

Databases

Clipper Interview Questions
DBA Interview Questions
Firebird Interview Questions
Hierarchical Interview Questions
Informix Interview Questions
Microsoft Access Interview Questions
MS SqlServer Interview Questions
MYSQL Interview Questions
Network Interview Questions
Object Relational Interview Questions
PL/SQL Interview Questions
PostgreSQL Interview Questions
Progress Interview Questions
Relational Interview Questions
SQL Interview Questions
SQL Server Interview Questions
Stored Procedures Interview Questions
Sybase Interview Questions
Teradata Interview Questions

Microsof Technologies

.Net Database Interview Questions
.Net Deployement Interview Questions
ADO.NET Interview Questions
ADO.NET 2.0 Interview Questions
Architecture Interview Questions
ASP Interview Questions
ASP.NET Interview Questions
ASP.NET 2.0 Interview Questions
C# Interview Questions
Csharp Interview Questions
DataGrid Interview Questions
DotNet Interview Questions
Microsoft Basics Interview Questions
Microsoft.NET Interview Questions
Microsoft.NET 2.0 Interview Questions
Share Point Interview Questions
Silverlight Interview Questions
VB.NET Interview Questions
VC++ Interview Questions
Visual Basic Interview Questions

Java / J2EE

Applet Interview Questions
Core Java Interview Questions
Eclipse Interview Questions
EJB Interview Questions
Hibernate Interview Questions
J2ME Interview Questions
J2SE Interview Questions
Java Interview Questions
Java Beans Interview Questions
Java Patterns Interview Questions
Java Security Interview Questions
Java Swing Interview Questions
JBOSS Interview Questions
JDBC Interview Questions
JMS Interview Questions
JSF Interview Questions
JSP Interview Questions
RMI Interview Questions
Servlet Interview Questions
Socket Programming Interview Questions
Springs Interview Questions
Struts Interview Questions
Web Sphere Interview Questions

Programming Languages

C Interview Questions
C++ Interview Questions
CGI Interview Questions
Delphi Interview Questions
Fortran Interview Questions
ILU Interview Questions
LISP Interview Questions
Pascal Interview Questions
Perl Interview Questions
PHP Interview Questions
Ruby Interview Questions
Signature Interview Questions
UML Interview Questions
VBA Interview Questions
Windows Interview Questions
Mainframe Interview Questions


Copyright © 2001-2024 Vyoms.com. All Rights Reserved. Home | About Us | Advertise With Vyoms.com | Jobs | Contact Us | Feedback | Link to Us | Privacy Policy | Terms & Conditions
Placement Papers | Get Your Free Website | IAS Preparation | C++ Interview Questions | C Interview Questions | Report a Bug | Romantic Shayari | CAT 2024

Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |


Copyright ©2001-2024 Vyoms.com, All Rights Reserved.
Disclaimer: VYOMS.com has taken all reasonable steps to ensure that information on this site is authentic. Applicants are advised to research bonafides of advertisers independently. VYOMS.com shall not have any responsibility in this regard.