Click Here to Install Silverlight*
IndiaChange|All Microsoft Sites
Microsoft
Communities 
 
Chat Transcript
 
Chat Topic : Globalizing and Localizing Applications using .NET
Chat Expert : Saurabh Verma
January 12, 2005
 
 

subhashini (Moderator):
Hi all. A very good evening to all of you.
subhashini (Moderator):
Thank you all for joining the chat and taking time out of your hectic schedules.
subhashini (Moderator):
The weekly chat details are given at <http://www.microsoft.com/india/communities/chat/default.aspx>
subhashini (Moderator):
The chat archives can be found at <http://www.microsoft.com/india/communities/chat/Transcripts.aspx>
subhashini (Moderator):
Welcome to today’s Web chat on Globalizing and Localizing Applications using .NET
subhashini (Moderator):
I am Subhashini Simha (MS India), the moderator for today’s chat.
subhashini (Moderator):
Today we have with us Saurabh Verma, as an expert for today’s chat.
subhashini (Moderator):
Saurabh works as a Developer at Microsoft and drive the development of internal tools at Microsoft. Saurabh is one of initiators and Managers of Microsoft Delhi .NET User Group (<http://groups.msn.com/dotnetsig>). He started the first group for Whidbey in India (<http://groups.msn.com/mywhidbey>). He is one among few in the world to achieve MVP (Visual C#), MCT.NET, MCSD.NET, MCDBA and couple of others certifications. In his free time he loves to blog at <http://blogs.msdn.com/saurabhv>
Saurabh Verma MS (Expert):
Hi Everybody
subhashini (Moderator):
Chat Procedures:
This chat will last for one hour. During this hour, our Experts will respond to as many questions as they can. Please understand that there may be some questions we cannot respond to due to lack of information or because the information is not yet public. We encourage you to submit questions for our Experts. Please us “submit a question “radial button to post your questions .We ask that you stay on topic for the duration of the chat. This helps the Guests and Experts follow the conversation more easily. We invite you to ask off topic questions after this chat is over.
subhashini (Moderator):
So let me welcome Saurabh to take over as he begins with the chat agenda for today.
subhashini (Moderator):
Hi Saurabh
Saurabh Verma MS (Expert):
Hi all, welcome to today’s community chat session on Globalizing and Localizing using .NEt
Saurabh Verma MS (Expert):
I will tour you towards the task of developing International Apps using .NET
Saurabh Verma MS (Expert):
I will cover the following in the today
Saurabh Verma MS (Expert):
What are the buzzwords - Globalization, Localizability and Localization?
Saurabh Verma MS (Expert):
Issues related to Globalization & Localization
How to make multilingual applications ?
Saurabh Verma MS (Expert):
Localizing .NET Applications
Best Practices for Globalization & Localization
Saurabh Verma MS (Expert):
Last but not the least
Saurabh Verma MS (Expert):
We will see some cool features of ASP.NET 2.0
Saurabh Verma MS (Expert):
which helps in localizing our web app better
Saurabh Verma MS (Expert):
What is Globalization?
Saurabh Verma MS (Expert):
To put in simple words,Globalization is the process of designing and developing an application that supports localized user interfaces and regional data for users in multiple cultures.n is the process of designing and deloping an application that supports localized user interfaces and regional data for users in multiple cultures
Saurabh Verma MS (Expert):
What is localization and Localizability
Saurabh Verma MS (Expert):
Localizability is an intermediate process for verifying that a globalized application is ready for localization.
Saurabh Verma MS (Expert):
I feel like there are couple of questions coming through
Saurabh Verma MS (Expert):
We will have a Q&A soon after this discussion
Saurabh Verma MS (Expert):
Localization is the process of translating an application's resources into localized versions for each culture that the application will support.
Saurabh Verma MS (Expert):
it composed of two blocks: UI Block and Code Block
Saurabh Verma MS (Expert):
Localized Version =Localized UI Block+Code
Saurabh Verma MS (Expert):
questions are invited :)
Saurabh Verma MS (Expert):
Q: how will you dynamically ref to different resource files?further if you deploy an app with let say an resource file as embed one then if later you modify the same you need to give a diferent setup.so do i ve to distribute a different satellite assembly ?
A: We need to change the current thread CultureInfo in the page_load
Saurabh Verma MS (Expert):
we can also use FileBasedResourceManager to programatically access resources
Saurabh Verma MS (Expert):
Coming to the second part
Saurabh Verma MS (Expert):
we come across issues when we go for Globalizing any application
Saurabh Verma MS (Expert):
just put in more details:
Saurabh Verma MS (Expert):
Comparing Data
Sorting Data
Date Conversion
Currency Conversion
Calendar Support
Localized Keyboard
Code Management is difficult
Application Scalability
Saurabh Verma MS (Expert):
We will see how .NET Framework solves most of these issues by providing out of the box support for GLOBALIZATION
Saurabh Verma MS (Expert):
System.Globalization Namespace
Saurabh Verma MS (Expert):
This includes
Saurabh Verma MS (Expert):
Includes classes for functionality such as:
Culture-aware string comparisons
AABC vs. ABCC (ordinal: codepoint values)
Coté vs. Côte (culture dependent)
Date & Time formatting
yy/mm/dd vs. dd/mm/yy
Numeric formatting
12,000.00 vs. 12.000,00
Calendars
Gregorian and non-Gregorian
Saurabh Verma MS (Expert):
to start with
Saurabh Verma MS (Expert):
CultureInfo Class will be the stop shop
Saurabh Verma MS (Expert):
We wud have a question like - what are the features which are provided by cultureinfo class.
Saurabh Verma MS (Expert):
its the provider for Provider of cultural preferences
Saurabh Verma MS (Expert):
and there are two roles in it
Saurabh Verma MS (Expert):
CurrentCulture
Saurabh Verma MS (Expert):
which is responsible for doing the following
Saurabh Verma MS (Expert):
Date and number formatting
String comparison and casing
Replaces and extends the locale ID in Win32
Saurabh Verma MS (Expert):
the other one is CurrentUICulture which takes care of the UI based stuff
Saurabh Verma MS (Expert):
I see lot of questions floating in.....
Saurabh Verma MS (Expert):
Lots of experts already in place.
Saurabh Verma MS (Expert):
Its time for the questions directly...
Saurabh Verma MS (Expert):
I'm all waiting
Saurabh Verma MS (Expert):
Q: Hi Saurabh ... Where do we find use of UI Block and Code Block??
A: UI Block: the Presentation Layer forms the UI block
Saurabh Verma MS (Expert):
All the Code based messages forms the Code Block.
Saurabh Verma MS (Expert):
like Status Bar Messages, Error Messages, Info Messages, etc.
Saurabh Verma MS (Expert):
Q: ok but what if u need to modify the res file later?
A: You can use VS.NET to modify .resx files
Saurabh Verma MS (Expert):
Now the part comes of deploying the .resx files
Saurabh Verma MS (Expert):
it depends like what approach has been taken to read the data from .resx files - satellite assemblies or file based resources
Saurabh Verma MS (Expert):
for file based resources - you just need to copy your updated resource file
Saurabh Verma MS (Expert):
for compiling your .resx file to satellite assembly - use resgen
Saurabh Verma MS (Expert):
Q: Can you give some idea on Localizing Dynamic Content ie Database Part
A: You can store the content in SQL Server. nChar, nVarChar
Saurabh Verma MS (Expert):
we will see a step by step process for localizing .NET Applications
Saurabh Verma MS (Expert):
STEP 1: Add Localized Resources
Saurabh Verma MS (Expert):
STEP 2: Set the CurrentCulture to Local Culture
Saurabh Verma MS (Expert):
STEP 3: Use ResourceManager to read resources
Saurabh Verma MS (Expert):
STEP 4: Use CultureInfo Class for culture-specific information (i.e. Date, Currency, etc.)
Saurabh Verma MS (Expert):
STEP 5: Use nChar, nVarChar for storing dynamic data in SQL Server
Saurabh Verma MS (Expert):
and for For setting the IME use InputLanguage.CurrentInputLanguage
Saurabh Verma MS (Expert):
any questions?
Saurabh Verma MS (Expert):
Q: What about Dynamic Content Localization ?
A: Microsoft has provided a tool called Enterprise Localization Toolkit (For ASP.NET 1.x) sites
Saurabh Verma MS (Expert):
There is an excellent article written by Todd
Saurabh Verma MS (Expert):
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/entloctoolkit.asp>
Saurabh Verma MS (Expert):
Q: asked the experts: using Globalization concept can we convert already existing web app into multilingual ?
A: Sure, we can do it.
Saurabh Verma MS (Expert):
But, again as I have experienced that localization has to be designed from Day 1 and not bolted on
Saurabh Verma MS (Expert):
that is difficult
Saurabh Verma MS (Expert):
some of the issues which you can come across are:
Saurabh Verma MS (Expert):
Language Issues
Describes how language issues are the result of differences in how languages around the world differ in display, alphabets, grammar, and syntactical rules.
Saurabh Verma MS (Expert):
User interface issues–In addition to text, user interfaces also typically contain elements such as images, user interface controls, and message boxes. To support localization, you must design these user interface elements carefully. For information about the user interface issues to consider, see "User Interface Issues" on MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxcondesigninginternational-awareuserinterface.asp </library/en-us/vsent7/html/vxconDesigningInternational-AwareUserInterface.asp>).
Saurabh Verma MS (Expert):
Data Formatting issues
Saurabh Verma MS (Expert):
Q: Are we discussing Localization in Whidbey or in ASP.NET 1.1?
A: At present, we are discussing using ASP.NET 1.x
Saurabh Verma MS (Expert):
at the end of this chat we will take a sneak preview on Localization features in ASP.NET 2.0
Saurabh Verma MS (Expert):
Q: can we implement our own language, and we can use?
A: Sure, You can implement INDIC languages too
Saurabh Verma MS (Expert):
the best place to start with will be http://www.bhashaindia.com
Saurabh Verma MS (Expert):
Q: How do detect the user’s culture?
A: Use System.Globalization.CultureInfo.CurrentCulture and System.Globalization.CultureInfo.CurrentUICulture
Saurabh Verma MS (Expert):
Q: Which method is best? ( File based or satellite assembly)?
A: Satellite assmebly is gives you better performance
Saurabh Verma MS (Expert):
whereas File-based gives you more freedom towards the deployment. You need to re-compile
Saurabh Verma MS (Expert):
Q: how to embed non string object into RESX file example images?
A:
Dim img As Image
Dim rsxw As ResXResourceWriter
img = Image.FromFile("en-AU.jpg")
rsxw = new ResXResourceWriter("en-AU.resx")
rsxw.AddResource("en-AU.jpg",img)
rsxw.Close()
Saurabh Verma MS (Expert):
Q: adding where to install the satellite assembly in above case and how the code will point to respective assembly? hope you got my point.
A: sure, Localization follows a proper directory hierarchy
Saurabh Verma MS (Expert):
Invariant Culture>Neutral Culture>Specific Culture
Saurabh Verma MS (Expert):
bin\hi\hi-IN
Saurabh Verma MS (Expert):
Q: Is there anything like a language translator in .NET 2?
A: In .NET 1.x we have a Enterprise Localization Toolkit, this has a translation tool too
Saurabh Verma MS (Expert):
Q: can I have Mixed Culture or Mixed Languages in a single WebPage?
A: Yeah, we need to use ResourceSet Class for the same. see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemresourcesresourcesetclasstopic.asp for more details
Saurabh Verma MS (Expert):
Q: can I put satellite assembly into GAC for common Use?
A: :) tricky one, this is a valid question like if we have an enterprise application, which is spanned between multiple applications
Saurabh Verma MS (Expert):
all the applications use common UI, Error or some other resources (logo, images, etc)
Saurabh Verma MS (Expert):
you can do it
Saurabh Verma MS (Expert):
Q: Can you tell me something about cultureInfo Class
A: this the main class used for localization. you can have the sample code for using this class from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemGlobalizationCultureInfoClassTopic.asp
Saurabh Verma MS (Expert):
Q: what is globalizing and localizing the application
A: Globalization means handling sorting, date, currency and time formats etc.
Saurabh Verma MS (Expert):
Localization revolves around the UI of the app. Responsible for changing the UI based on the language. i.e. hi-IN, gu-IN, etc
Saurabh Verma MS (Expert):
Q: We are developing an ASP.NET Application. The Application needs to support Chinese, Japanese and Korean languages at a later stage. What are the considerations to be taken during database design and ASPX pages Design ?
A: Use Satellite assemblies, don't hardcode the Client facing strings
Saurabh Verma MS (Expert):
You can dig more at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconTestingForGlobalizationLocalization.asp for understanding Localization planning better
Saurabh Verma MS (Expert):
Q: sure. let me create an app with 3 resource files as embed resources now i made setup of all app and ships it. later if i need to modify the res files I need to give a new setup for entire app right? thus can I use a satellite assembly separate for the same?
A: VS.NET automatically combines all three .resx files and generate satellite assembly
Saurabh Verma MS (Expert):
if going with the .NET Framework SDK way. First you need to generate .resource files from .resx using Resgen.exe
Saurabh Verma MS (Expert):
then you can generate satellite assembly from .resource files using AL.exe
Saurabh Verma MS (Expert):
al /t:lib /embed:strings.de.resources /culture:de /out:MyApp.resources.dll
Saurabh Verma MS (Expert):
We will see now what flexibility is provided by ASP.NET 2.0
Saurabh Verma MS (Expert):
:D as ASP.NET promises to decrease coding efforts
subhashini (Moderator):
We have the last 8 mins left. I request all of you
subhashini (Moderator):
to ask teh last few questions
Saurabh Verma MS (Expert):
we can feel the same when you go for using Localization in ASP.NET 2.0
subhashini (Moderator):
And to email Saurabh for any of your queries
Saurabh Verma MS (Expert):
some of the features provided by ASP.NET 2.0 are
Saurabh Verma MS (Expert):
Give tools for automating the generation of resource files for Web applications.
Saurabh Verma MS (Expert):
Provides out of the box support for integrated support for new localization features by using ASP.NET controls
Saurabh Verma MS (Expert):
Giving the freedom of XCOPY deployment, removing the need for compiling the resources
Saurabh Verma MS (Expert):
Automating the task of applying the correct culture
Saurabh Verma MS (Expert):
to go in details
Saurabh Verma MS (Expert):
we have
Saurabh Verma MS (Expert):
Implicit and Explicit Expressions
Saurabh Verma MS (Expert):
using Local Resources
Saurabh Verma MS (Expert):
above all Localizing Static content
Saurabh Verma MS (Expert):
If we recall from the front of .NET Localization support for Winforms
subhashini (Moderator):
with so many questions the chat seems unending , but we will extend it for another 10 minutes
Saurabh Verma MS (Expert):
Windows Forms have a property called Localizable
subhashini (Moderator):
Please make a note of Saurabh's email id saurabv@microsoft.com
Saurabh Verma MS (Expert):
If we set this to true, it will generate the .resx files automatically for all the controls placed on the form
Saurabh Verma MS (Expert):
what it does internally, it loops thru all the controls placed and enumerate thru all the properties of the controls and if the property have a Localizable attribute to true
Saurabh Verma MS (Expert):
that particular property will be added in the .resx file
Saurabh Verma MS (Expert):
similar has been implemented in ASP.NET 2.0
Saurabh Verma MS (Expert):
in ASP.NET 2.0, we just need to place the controls
Saurabh Verma MS (Expert):
go to tools menu in VS.NET
Saurabh Verma MS (Expert):
Select Generate Local Resource
Saurabh Verma MS (Expert):
This will automatically generate the .resx file and put them in the Local Resource Folder
Saurabh Verma MS (Expert):
after this has been generated
Saurabh Verma MS (Expert):
let's see what are implicit and explicit expression
Saurabh Verma MS (Expert):
for using Implicit Expressions
Saurabh Verma MS (Expert):
just add meta:resourcekey="ButtonResource1" for your control
Saurabh Verma MS (Expert):
<asp:Button ID="Button1" Runat="server" Text="English Button" meta:resourcekey="ButtonResource1"/>
Saurabh Verma MS (Expert):
resourcekey identifies the content to be read from the appropriate resource file
Saurabh Verma MS (Expert):
Explicit Expressions - are useful for localizing those properties that are not marked as localizable.
Saurabh Verma MS (Expert):
liek back color of button
Saurabh Verma MS (Expert):
like BackColor property of the Button control
Saurabh Verma MS (Expert):
we have to create an entry in .resx file i.e. GlobalColor
Saurabh Verma MS (Expert):
and use Explicit expression to read the same.
<asp:Button ID="Button1" Runat="server" Text="English Button" meta:resourcekey="ButtonResource1" BackColor='<%$ Resources:GlobalColor%>'/>
Saurabh Verma MS (Expert):
there can be some cases, where we don;t want to generate resources for some controls
Saurabh Verma MS (Expert):
so we have the feature for supressing those controls too.
Saurabh Verma MS (Expert):
we have to set the "localize" property to false
<asp:Button ID="Button2" Runat="server" Text="Button" Width="139px" Height="24px" meta:localize="false"/>
Saurabh Verma MS (Expert):
last but not the least - feature of localizing static content
Saurabh Verma MS (Expert):
:) Hope everybody will be happy to hear that, we can localize the static content too.
Saurabh Verma MS (Expert):
without writing any code for the same
Saurabh Verma MS (Expert):
we have to include an <localize> tag for the same
<localize Runat="Server" meta:resourcekey="LiteralResource1">Welcome to Microsoft</localize>
Saurabh Verma MS (Expert):
what happens internally, when we select Generate Local Resource from tools options, it searches for <Localize> tag
Saurabh Verma MS (Expert):
and if set to true, it adds an relevant entry to resource file and modifies our code from to
<localize Runat="Server">Welcome to Microsoft</localize>
Saurabh Verma MS (Expert):
<localize Runat="Server" meta:resourcekey="LiteralResource1">Welcome to Microsoft</localize>
Saurabh Verma MS (Expert):
So, buddies I am done for the day.
Saurabh Verma MS (Expert):
and I would like to give few links, which will ease your life from the Globalization and Localization front
Saurabh Verma MS (Expert):
Microsoft has a dedicated site http://www.microsoft.com/globaldev/getwr/dotneti18n.mspx
Saurabh Verma MS (Expert):
which concentrates on this topic
Saurabh Verma MS (Expert):
with full support of code and appropriate theory materials
Saurabh Verma MS (Expert):
Time for Q& A
Saurabh Verma MS (Expert):
:)
Saurabh Verma MS (Expert):
Q: Will VS2005 have support for Bengali (bn-IN & bn-BD) and Malayalam?
A: sure
Saurabh Verma MS (Expert):
Q: how to embed non string object into RESX file example images?
A: Double click on the .resx file in VS.NET 2005 "Whidbey"
Saurabh Verma MS (Expert):
Unlike VS.NET 2003 in VS.NET 2005 you will see and combobox displaying categories
subhashini (Moderator):
Saurabh is trying to wrap up as many question as [possible
Saurabh Verma MS (Expert):
select Images and click Add button
Saurabh Verma MS (Expert):
easy. :)
subhashini (Moderator):
Please email him at sauabv@microsoft.com
subhashini (Moderator):
for any additional queries
Saurabh Verma MS (Expert):
Q: What is the different procedure we have to take care in WinForms and WebForms?
A: In WinForms we have a property called Localizable, just need to set it true.
subhashini (Moderator):
I m sorry typo error saurabv@microsoft.com
Saurabh Verma MS (Expert):
I will be happy to take more questions on the same
Saurabh Verma MS (Expert):
you can post questions on my blog (http://blogs.msdn.com/saurabhv)
subhashini (Moderator):
The chat archives can be found at <http://www.microsoft.com/india/communities/chat/Transcripts.aspx>
Saurabh Verma MS (Expert):
I appreciate you all for sharing your valuable time. :)
subhashini (Moderator):
I thank you all for attending the chat . Have a lovely evening .
subhashini (Moderator):
The next details will be put up at The chat archives can be found at <http://www.microsoft.com/india/communities/chat/Transcripts.aspx>
subhashini (Moderator):
The weekly chat details are given at <http://www.microsoft.com/india/communities/chat/default.aspx>
subhashini (Moderator):
Thanks Saurabh

 
     

©2009 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy Statement