Localization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation.

Slides:



Advertisements
Similar presentations
1 Introduction to ASP.Net 4.0 Development David Ringsell MCSD MCT MCPD.
Advertisements

Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD.
Unit 1: Overview of the Microsoft.NET Platform
1 Unit 1: Introduction To.Net. 2 Introduction to.Net Integrated Development Environment (IDE) Languages in the.NET Framework The Common Language Runtime.
Tahir Nawaz Introduction to.NET Framework. .NET – What Is It? Software platform Language neutral In other words:.NET is not a language (Runtime and a.
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
Building International Applications with Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corporation.
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
SSCLI (Shared Source Common Language Infrastructure) (code name: Rotor)
Why.NET? Various languages struggling to interoperate with each other Developers undergoing huge learning curves to shift from one language to another.
.Net Overview Giuseppe Attardi Università di Pisa.
Microsoft.NET Overview.NET Framework Topics Dave Schmitt Principal Technology Specialist Microsoft Corporation
DEV200.NET Framework Overview Chris Anderson Software Architect,.NET Client Microsoft Corporation.
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Module 1: Overview of the Microsoft.NET Framework.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Tutorial -01. Objective In this session we will discuss about : 1.What is MVC? 2.Why MVC? 3.Advantages of MVC over ASP.NET 4.ASP.NET development models.
Creating Multi-lingual Applications and Websites with Microsoft Visual Studio 2005 Achim Ruopp International Program Manager Microsoft Corporation.
Developing International Applications for Mobile Devices with.NET Achim Ruopp International Program Manager Microsoft Corporation.
IT533 Lectures Configuring, Deploying, Tracing and Error Handling.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Using.NET Skills To Build Mobile Applications In Compact Framework Punit Shah Technical Lead | Microsoft |
Creating and Running Your First C# Program Telerik Software Academy Telerik School Academy.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Visual Studio.NET and.NET Compact Framework Application Development Mike D. Smith Group Program Manager Developer Division Microsoft Corporation.
Microsoft.NET Framework Overview Abidi Mahmoud Seminarium on Component -based Software Engineering.
Session 1 - Introduction and Data Access Layer
Understanding Code Compilation and Deployment Lesson 4.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
WEB326 ASP.NET 2.0: Going Global Gets Easier! New Localization Features in ASP.NET 2.0 Michele Leroux Bustamante Architect, IDesign Microsoft Regional.
The Company….  The Market Leader in Globalization Technology –Pioneers in visual translation environments –Solutions for major platforms & programming.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Connecting Cold Fusion to.NET Using Web Services Geoff Snowman Developer Community Champion
What is.NET? CS 351 Ed Gellenbeck. Today What is.NET? What Problems Does.NET Solve? What are.NET Framework Components?
CF and.NET Working Together Using Web Services Geoff Snowman Developer Community Champion Microsoft Corporation.
.Net Framework Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours
.NET Framework Danish Sami UG Lead.NetFoundry
Globalization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation.
1 Hammad Khan. COURSE CONTENTS.NET Framework And C# SQL Server 2008 ADO.NET LINQ ASP.NET Dynamics Data ASP.NET MVC framework 2 Advance C# Concepts Windows.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Building multi-lingual ASP.Net application that handle western languages and Arabic with a single code base.
DEV382 Building International Applications with the.NET Framework Christian Nagel Microsoft Regional Director Global Knowledge.
Internationalization in ASP.NET 2.0. SQL Server 2005 – Data Columns Use Unicode datatypes in: Table columns, CONVERT() and CAST() operations Use Unicode.
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
DEV392.NET Framework: Building Applications With Globalization In Mind Michele Leroux Bustamante Principal Software Architect IDesign Inc.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
Getting Started with Oracle Berkeley DB 11gR2 and ADO.NET
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Integrating and Extending Workflow 8 AA301 Carl Sykes Ed Heaney.
Alexey Polovinkin Post graduate student, CMC department.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
Working in a Mobile App Development Environment Lesson 2.
7/23/2016 CSC 325 Advanced Programming Techniques Localization Slide #1 1 Localization Mikhail Brikman.
Random Logic l Forum.NET l Localization & Globalization Forum.NET ● May 29, 2006.
ClickOnce Deployment (One-click Deployment)
Introducing the Microsoft® .NET Framework
ASP.NET Programming with C# and SQL Server First Edition
Metropolia 2013 C# programming and .NET framework
Globalization support in ASP.NET
Haritha Dasari Josue Balandrano Coronel -
Mobile Application Development 2005 By Sam Nasr July 25, 2006
Deepak Shenoy Agni Software
ClickOnce Deployment (One-click Deployment)
.NET Framework Design Goals
Presentation transcript:

Localization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation

Key Terms (as used in this talk)  Globalization (a.k.a. Internationalization) Core application handles international data  Character encodings  Date and time, numeric, currency formats  …  Market adaptation Additional functionality for a given market  Localization = translation Localizable = ready for translation Resources  Application elements (error messages, UI) to be translated in localized versions

.NET Framework Namespace System System.DataSystem.Xml System.Web Globalization Diagnostics Configuration Collections Resources Reflection Net IO Threading Text ServiceProcess Security Design ADO SQLTypes SQL XPath XSLT Runtime InteropServices Remoting Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.WinForms DesignComponentModel

System.Resources namespace  ResourceManager Provides access to culture-correct resources at runtime.  ResourceWriter Writes resources to an output stream or file  ResourceReader Reads resources name-value pairs from resources files and streams  ResourceSet Stores all resources localized for a particular culture

System.Globalization.CultureInfo  Provider of cultural preferences  Two roles CurrentCulture  Date and number formatting  String comparison and casing CurrentUICulture  Resource selection for user interface Can be controlled on a per thread basis  RFC 1766 derived hierarchy  CultureInfo.CreateSpecificCulture Optional mapping from neutral to specific

CultureInfo  Neutral culture Based on language Resource only No formatting CurrentUICulture only  Specific culture Based on language & region Resource & Formatting specifics CurrentCulture & CurrentUICulture

Resource Model .NET Framework uses a new resource model ResX file format Resources files Satellite Resources DLLs  Naming conventions  Resource Fallback

ResX Files  Simple, (almost) human-readable XML format  Can include arbitrary objects  Created with.NET Framework SDK  Can also be created with Visual Studio See other talk on this topic

Resource generation process .resx file XML-based file Describes resources .resources file binary compiled file  Satellite.resources.dll: Embedded.resources file(s).resx file.resources file.resources.dll file

Naming convention  Naming pattern conventions.resources files: ..resources Satellite assemblies .resources.dll  Directory locations for satellites: A subdirectory per culture either neutral or specific cultures can be used Myproject.dll  \fr\myproject.resources.dll(neutral)  \de-DE\myproject.resources.dll(specific)

Resource Fallback

Loading Resources  Creating a Resource Manager The RM constructor indicates the file from which resources are to be loaded. Several alternatives  Load from a loose.resources file  Load from this assembly  Load from another assembly  Load from a custom resource format if you write your own resource manager (e.g. a database) See.NET SDK, Samples and Tutorials, ASP.NET QuickStarts, and How Do I … samples

Loading Resources, continued Resource manager can be used to load both strings and objects:  RM.GetString (“mystring”, new CultureInfo(“en-NZ”) )  RM.GetString (“mystring”)  RM.GetObject(“Button1.Cursor”) Loads requested resources based on Thread.CurrentThread.CurrentUICulture Fallback hierarchy derived from RFC 1766

Localization Process  Start with a.txt or a.resx file.txt files(string data only).resx files(string data and arbitrary objects) XML tools can be used with.resx files External localization tools vendor support  Lionbridge,  WinRes Resize WindowsForms forms WinRes does not require access to source Visual Studio IDE: integrates this capability  ResGen: Compile data to.resources binary files

Localization Process  AL (or compiler): add.resources into assembly. (AL is an SDK linker) al /t:lib /culture:en-NZ /embed:strings.en- NZ.resources /out:myapp.resources.dll  Optional: use SN for strong-naming  VS IDE : add translated.resx file into project

ASP.NET And Localization  ASP.NET has a flexible resource model There is not one single way to organize localizable resources Applications vary; developers can choose. The following section shows a few alternatives..NET Framework SDK has additional samples  ASP.NET QuickStarts, localization section, working with resources files.

ASP.NET Localization Options A: Resources included in source (like ASP)  Copy of each page per language  Specify culture in page directive or web.config  Advantages: Good for static content Rapid initial development  Disadvantages: High maintenance costs Not suitable for dynamic content Localizers and developers are working on the same source file. Potential for conflicting updates  Not recommended

ASP.NET Localization Options B: Resources separated from source  Use Resource Manager to load resources Resources could be in Loose.resources files Satellites below each main assembly A separate (parallel) main assembly with satellites below it One.resources file or satellite per language Slightly different ResourceManager constructors for each case

ASP.NET Localization Options B: Resources separate from source, continued:  Advantages: Can deploy additional languages incrementally, without redeploying core code Lower maintenance costs, as there is one central app, not many parallel versions.  Disadvantages: More files Loose.resources can have locking issue.  No locking issue for satellites or parallel main assembly with satellites.  Shadow-copying done for exes and dlls (main assemblies and satellites).  Samples: ASP.NET Quickstarts, Localization section

ASP.NET Localization Options C: Satellite Resource DLLs  Advantages: Can deploy additional languages incrementally, without redeploying core code Lower maintenance costs, as there is one central app, not many parallel versions. Shadow-copying done for exes and dlls (main assemblies and satellites).  Disadvantages: More files Added initial application development complexity

Demo  Localizing a WebForm application

Summary .NET Framework provides built-in support for localization and globalization  ASP.NET builds on Framework support for international app development More options for specifying encoding Can separate code from resources Can utilize.NET Frameworks classes Developers can develop/host multi-cultural apps on a single server  Visual Studio makes it easier to build localized apps See Achim Ruopp’s talk

Additional References .NET Framework SDK Tutorial: Resources and localization (includes tools) .NET Framework SDK Samples ASP.NET Quickstart Localization section WinForms QuickstartLocalization sample How Do I … samples: Resources Globalization .NET Framework SDK Tools: ResGen, WinRes, AL, SN

Additional References  Documentation.NET Framework SDK:  Developing World-Ready Applications Visual Studio :  Visual Studio.NET\Visual Basic and VisualC#\Globalizing and Localizing\Walkthroughs  General info on.NET Framework:

Questions ?