Click here to Skip to main content
15,896,118 members
Articles / Programming Languages / XML

Globalization, Internationalization (I18N), and Localization using C# and .NET 2.0

Rate me:
Please Sign up or sign in to vote.
4.27/5 (15 votes)
2 Nov 2009CPOL8 min read 152.9K   5K   66  
The globalization, internationalization (I18N), and localization of Windows applications in the .NET 2.0 platform.
namespace CultureInfoDemo
{
    partial class EntryForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.myMinimizeButton = new System.Windows.Forms.Button();
            this.myCloseButton = new System.Windows.Forms.Button();
            this.myInnerPanel = new System.Windows.Forms.Panel();
            this.myOkButton = new System.Windows.Forms.Button();
            this.mySelectLanguageLabel = new System.Windows.Forms.Label();
            this.myLanguageComboBox = new System.Windows.Forms.ComboBox();
            this.myTitleLabel = new System.Windows.Forms.Label();
            this.myInnerPanel.SuspendLayout();
            this.SuspendLayout();
            // 
            // myMinimizeButton
            // 
            this.myMinimizeButton.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.myMinimizeButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.myMinimizeButton.ForeColor = System.Drawing.Color.White;
            this.myMinimizeButton.Location = new System.Drawing.Point(258, 3);
            this.myMinimizeButton.Name = "myMinimizeButton";
            this.myMinimizeButton.Size = new System.Drawing.Size(21, 21);
            this.myMinimizeButton.TabIndex = 5;
            this.myMinimizeButton.Text = "_";
            this.myMinimizeButton.UseVisualStyleBackColor = false;
            this.myMinimizeButton.Click += new System.EventHandler(this.myMinimizeButton_Click);
            // 
            // myCloseButton
            // 
            this.myCloseButton.BackColor = System.Drawing.Color.Red;
            this.myCloseButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.myCloseButton.ForeColor = System.Drawing.Color.White;
            this.myCloseButton.Location = new System.Drawing.Point(278, 3);
            this.myCloseButton.Name = "myCloseButton";
            this.myCloseButton.Size = new System.Drawing.Size(21, 21);
            this.myCloseButton.TabIndex = 6;
            this.myCloseButton.Text = "X";
            this.myCloseButton.UseVisualStyleBackColor = false;
            this.myCloseButton.Click += new System.EventHandler(this.myCloseButton_Click);
            // 
            // myInnerPanel
            // 
            this.myInnerPanel.BackColor = System.Drawing.Color.DimGray;
            this.myInnerPanel.Controls.Add(this.myOkButton);
            this.myInnerPanel.Controls.Add(this.mySelectLanguageLabel);
            this.myInnerPanel.Controls.Add(this.myLanguageComboBox);
            this.myInnerPanel.Location = new System.Drawing.Point(3, 26);
            this.myInnerPanel.Name = "myInnerPanel";
            this.myInnerPanel.Size = new System.Drawing.Size(295, 172);
            this.myInnerPanel.TabIndex = 7;
            // 
            // myOkButton
            // 
            this.myOkButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.myOkButton.Location = new System.Drawing.Point(43, 105);
            this.myOkButton.Name = "myOkButton";
            this.myOkButton.Size = new System.Drawing.Size(212, 28);
            this.myOkButton.TabIndex = 5;
            this.myOkButton.Text = "OK";
            this.myOkButton.UseVisualStyleBackColor = true;
            this.myOkButton.Click += new System.EventHandler(this.myOkButton_Click);
            // 
            // mySelectLanguageLabel
            // 
            this.mySelectLanguageLabel.AutoSize = true;
            this.mySelectLanguageLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.mySelectLanguageLabel.Location = new System.Drawing.Point(39, 20);
            this.mySelectLanguageLabel.Name = "mySelectLanguageLabel";
            this.mySelectLanguageLabel.Size = new System.Drawing.Size(216, 20);
            this.mySelectLanguageLabel.TabIndex = 4;
            this.mySelectLanguageLabel.Text = "Please select a Language";
            // 
            // myLanguageComboBox
            // 
            this.myLanguageComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.myLanguageComboBox.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.myLanguageComboBox.FormattingEnabled = true;
            this.myLanguageComboBox.Items.AddRange(new object[] {
            "English",
            "French",
            "Italian",
            "German"});
            this.myLanguageComboBox.Location = new System.Drawing.Point(43, 61);
            this.myLanguageComboBox.Name = "myLanguageComboBox";
            this.myLanguageComboBox.Size = new System.Drawing.Size(212, 28);
            this.myLanguageComboBox.TabIndex = 3;
            // 
            // myTitleLabel
            // 
            this.myTitleLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.myTitleLabel.Location = new System.Drawing.Point(0, 0);
            this.myTitleLabel.Name = "myTitleLabel";
            this.myTitleLabel.Size = new System.Drawing.Size(299, 26);
            this.myTitleLabel.TabIndex = 8;
            this.myTitleLabel.Text = "I18N Demo Application";
            // 
            // EntryForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.SystemColors.ActiveCaption;
            this.ClientSize = new System.Drawing.Size(301, 202);
            this.ControlBox = false;
            this.Controls.Add(this.myInnerPanel);
            this.Controls.Add(this.myCloseButton);
            this.Controls.Add(this.myMinimizeButton);
            this.Controls.Add(this.myTitleLabel);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Name = "EntryForm";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "I18N Demo Application";
            this.myInnerPanel.ResumeLayout(false);
            this.myInnerPanel.PerformLayout();
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.Button myMinimizeButton;
        private System.Windows.Forms.Button myCloseButton;
        private System.Windows.Forms.Panel myInnerPanel;
        private System.Windows.Forms.Button myOkButton;
        private System.Windows.Forms.Label mySelectLanguageLabel;
        private System.Windows.Forms.ComboBox myLanguageComboBox;
        private System.Windows.Forms.Label myTitleLabel;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Philips
India India
Have been working with computers since the early 00's. Since then I've been building, fixing, configuring, installing, coding and designing with them. At present I mainly code windows applications in C#, WCF, WPF and SQL. I'm very interested in Design Patterns and try and use these generic principles in all new projects to create truly n-tier architectures. Also I like to code for making the User Interface very attractive...

Comments and Discussions