SlideShare a Scribd company logo
Localization and globalization in c#
 Localization is the process of customizing

your application for a given culture and
locale.


Globalization is the process of designing
and developing applications for multiple
cultures.








Languages depend upon the geographical
location.
For eg:fr is the code for French language.
fr-FR means French language in France.
So, fr specifies only the language whereas fr-FR
is the locale.
Similarly, fr-CA defines another locale implying
French language and culture in Canada.
If we use only fr, it implies a neutral culture (i.e.,
location neutral).
Culture & UICulture
•UICulture: gets/sets the user interface culture for the
currently executing thread.
•This property helps the runtime to load the resource
strings from a specific resource file (which we will see
later).
•This property can take neutral cultures as well as
locales. For example:
Thread.CurrentThread.CurrentUICulture = new
CultureInfo(“fr”);
Or,
Thread.CurrentThread.CurrentUICulture = new
CultureInfo(“fr-CA”);
• Culture: gets/sets the region specific culture
and formats of currency, dates etc.
•This needs language as well as location
(locale).

Thread.CurrentThread.CurrentCulture = new
CultureInfo(“fr-CA”); //correct as we have given
locale
Thread.CurrentThread.CurrentCulture = new
CultureInfo(“fr”); //wrong, will not work
Switching Locale
•Use the browser settings:
In IE, the user can change the culture by going
to
Internet Options->General->Languages.
For this to work, we need to set both the Culture and
the UICulture to auto and enableClientBasedCulture
= true as:
<GLOBALIZATION culture="auto" uiculture="auto"
enableClientBasedCulture="”true”" />
•User specified settings:
We can give an option for the user to
specify and change the culture and the language at
Resource File
•A resource file is a XML file that
contains the strings that we want to

a. Translate into different languages.
b. Can be updated dynamically so
that user themselves can modify
values in resource files once the
application is deployed on the
server without re-compiling the
entire application itself.
•The resource file contains key /
value pairs.
•Each pair is an individual resource.
Local resource is specific to a single web
page and used for providing versions of a
Web page in different languages.
 resources must be stored in
App_LocalResources sub folder.

Global resource can be read from any
page or code that is in the application.
 Global resource must be stored in
App_GlobalResources sub folder.



LocalResources folder contains resources
which apply for one page or user control
only.



While resources in GlobalResources are
accessible in the whole application.
 Design a fairly simple webpage with a few
label controls and a button control
 Tools

Generate Local Resource

This will create a corresponding
Default.aspx.resx resource file for your
webpage
in the App_LocalResources folder.
 Note: Controls removed from the page will still
show up in the resource file.
Make sure to clean the resource file if you have
•The attribute meta:resourcekey was added to
your controls.
•The attribute value corresponds to the resource
file control names
(e.g. meta:resourcekey="Label1Resource1"
corresponds to "Label1Resource1"
and all its properties in the Default.aspx.resx file).
<%@ Page Language="VB"
AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default"
culture="es-MX"
meta:resourcekey="PageResource1"
uiculture="es" %>
Localization and globalization in c#

More Related Content

PPTX
C#: Globalization and localization
PPTX
Corpus linguistics
PDF
An article on applying theme and rheme analysis in translation
PPTX
Language Learning in the Linguistic Landscape - Nov. 6, 2014
PPT
Brief history of the english language
PPTX
Syntax (Introduction to Linguistics)
PPTX
How to Use Corpora in Language Teaching
PPTX
Corpus linguistics the basics
C#: Globalization and localization
Corpus linguistics
An article on applying theme and rheme analysis in translation
Language Learning in the Linguistic Landscape - Nov. 6, 2014
Brief history of the english language
Syntax (Introduction to Linguistics)
How to Use Corpora in Language Teaching
Corpus linguistics the basics

Viewers also liked (9)

PDF
Localization And Branding
PPT
Localization framework
PPT
Localization in WSN
PDF
Localization Project Management
PPT
Localization and contextualization_04162014
PDF
Localization Project Management
PDF
Translation, Localization And Globalization Zhu Xianchao
PPTX
Localization & contextualization
PPT
Localization of MI on ECG
Localization And Branding
Localization framework
Localization in WSN
Localization Project Management
Localization and contextualization_04162014
Localization Project Management
Translation, Localization And Globalization Zhu Xianchao
Localization & contextualization
Localization of MI on ECG
Ad

Similar to Localization and globalization in c# (20)

PPTX
Globalization and accessibility
PDF
Localization
PDF
Multilingual user interface for website using resource files
PDF
Multilingual user interface for website using resource
PPSX
11 asp.net session16
PPS
11 asp.net session16
PPT
Microsoft .NET Development Platform Internationalization
PDF
ASP.NET Interview Questions PDF By ScholarHat
PPT
Web Usability International Design
DOCX
Windows Store App - Globalization
PPS
06 gui 08
PPTX
PPT
Session 8 : internationalization - Giáo trình Bách Khoa Aptech
PPTX
Windows 8 DevUnleashed - Session 1
DOCX
Abstract
PPTX
DOCX
Walkthrough asp.net
KEY
Building Multilanguage (i18n) Flex Applications
PDF
Windows phone 8 session 6
PDF
Asp.net w3schools
Globalization and accessibility
Localization
Multilingual user interface for website using resource files
Multilingual user interface for website using resource
11 asp.net session16
11 asp.net session16
Microsoft .NET Development Platform Internationalization
ASP.NET Interview Questions PDF By ScholarHat
Web Usability International Design
Windows Store App - Globalization
06 gui 08
Session 8 : internationalization - Giáo trình Bách Khoa Aptech
Windows 8 DevUnleashed - Session 1
Abstract
Walkthrough asp.net
Building Multilanguage (i18n) Flex Applications
Windows phone 8 session 6
Asp.net w3schools
Ad

More from PaYal Umraliya (6)

PDF
Information systems by checkmate...
DOC
CRUD(IN_UP_DEL) IN JAVA
PPTX
Introduction to wpf
PPTX
tittanium
DOCX
MODELS USED IN SOFTWARE DEVELOPMENT
DOCX
Wsn by checkmate
Information systems by checkmate...
CRUD(IN_UP_DEL) IN JAVA
Introduction to wpf
tittanium
MODELS USED IN SOFTWARE DEVELOPMENT
Wsn by checkmate

Recently uploaded (20)

PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
August Patch Tuesday
PDF
Mushroom cultivation and it's methods.pdf
PPTX
1. Introduction to Computer Programming.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Spectroscopy.pptx food analysis technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Assigned Numbers - 2025 - Bluetooth® Document
A comparative study of natural language inference in Swahili using monolingua...
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Encapsulation_ Review paper, used for researhc scholars
A comparative analysis of optical character recognition models for extracting...
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
August Patch Tuesday
Mushroom cultivation and it's methods.pdf
1. Introduction to Computer Programming.pptx
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Spectroscopy.pptx food analysis technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Localization and globalization in c#

  • 2.  Localization is the process of customizing your application for a given culture and locale.  Globalization is the process of designing and developing applications for multiple cultures.
  • 3.       Languages depend upon the geographical location. For eg:fr is the code for French language. fr-FR means French language in France. So, fr specifies only the language whereas fr-FR is the locale. Similarly, fr-CA defines another locale implying French language and culture in Canada. If we use only fr, it implies a neutral culture (i.e., location neutral).
  • 4. Culture & UICulture •UICulture: gets/sets the user interface culture for the currently executing thread. •This property helps the runtime to load the resource strings from a specific resource file (which we will see later). •This property can take neutral cultures as well as locales. For example: Thread.CurrentThread.CurrentUICulture = new CultureInfo(“fr”); Or, Thread.CurrentThread.CurrentUICulture = new CultureInfo(“fr-CA”);
  • 5. • Culture: gets/sets the region specific culture and formats of currency, dates etc. •This needs language as well as location (locale). Thread.CurrentThread.CurrentCulture = new CultureInfo(“fr-CA”); //correct as we have given locale Thread.CurrentThread.CurrentCulture = new CultureInfo(“fr”); //wrong, will not work
  • 6. Switching Locale •Use the browser settings: In IE, the user can change the culture by going to Internet Options->General->Languages. For this to work, we need to set both the Culture and the UICulture to auto and enableClientBasedCulture = true as: <GLOBALIZATION culture="auto" uiculture="auto" enableClientBasedCulture="”true”" /> •User specified settings: We can give an option for the user to specify and change the culture and the language at
  • 7. Resource File •A resource file is a XML file that contains the strings that we want to a. Translate into different languages. b. Can be updated dynamically so that user themselves can modify values in resource files once the application is deployed on the server without re-compiling the entire application itself. •The resource file contains key / value pairs. •Each pair is an individual resource.
  • 8. Local resource is specific to a single web page and used for providing versions of a Web page in different languages.  resources must be stored in App_LocalResources sub folder. 
  • 9. Global resource can be read from any page or code that is in the application.  Global resource must be stored in App_GlobalResources sub folder. 
  • 10.  LocalResources folder contains resources which apply for one page or user control only.  While resources in GlobalResources are accessible in the whole application.
  • 11.  Design a fairly simple webpage with a few label controls and a button control  Tools Generate Local Resource This will create a corresponding Default.aspx.resx resource file for your webpage in the App_LocalResources folder.  Note: Controls removed from the page will still show up in the resource file. Make sure to clean the resource file if you have
  • 12. •The attribute meta:resourcekey was added to your controls. •The attribute value corresponds to the resource file control names (e.g. meta:resourcekey="Label1Resource1" corresponds to "Label1Resource1" and all its properties in the Default.aspx.resx file). <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" culture="es-MX" meta:resourcekey="PageResource1" uiculture="es" %>