Creating Multi-lingual Applications and Websites with Microsoft Visual Studio 2005 Achim Ruopp International Program Manager Microsoft Corporation.

Slides:



Advertisements
Similar presentations
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
Advertisements

Microsoft SharePoint 2010 technology for Developers
Building International Applications with Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corporation.
Developing Arabic Applications with Visual Studio 2005 Dina Lasheen Program Manager – Developer Division.
Java Script Session1 INTRODUCTION.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
FIRST LOOK AT “ORCAS” Scott Guthrie General Manager.NET Developer Platform.
11 ASP.NET Slides based off:. 22 B ACKGROUND - W EB A RCHITECTURE Web Server PC/Mac/Unix/... + Browser Client Server Request:
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Create Windows ® Applications with.NET Allan Knudsen.NET Developer Evangelist Microsoft.
ASP.NET Programming with C# and SQL Server First Edition
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
 Visual Studio has great support for building ASP.NET web applications  Real web application development involves more than just copying the files created.
Virtual techdays INDIA │ august 2010 Building ASP.NET applications using SQL Server Compact Chaitanya Solapurkar │ Partner Technical Consultant,
.NET On A Shoe String By: Patrick Brannen Lead Developer iDevCo, Inc.
Windows Forms in Visual Studio 2005: An Overview Saurabh Pant Program Manager Microsoft Corporation.
Developing International Applications for Mobile Devices with.NET Achim Ruopp International Program Manager Microsoft Corporation.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
Introduction to.Net and ASP.Net Course Introduction Build Your Own ASP.Net Website: Chapter 1 Microsoft ASP.Net Walkthrough: Creating a Basic Web Forms.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.

Understanding Code Compilation and Deployment Lesson 4.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
WEB326 ASP.NET 2.0: Going Global Gets Easier! New Localization Features in ASP.NET 2.0 Michele Leroux Bustamante Architect, IDesign Microsoft Regional.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Introducing Reporting Services for SQL Server 2005.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
Tutorial 121 Creating a New Web Forms Page You will find that creating Web Forms is similar to creating traditional Windows applications in Visual Basic.
Introduction to ASP.NET 1www.tech.findforinfo.com.
ASP.NET application. Roadmap ASP.NET file types Bin directory Application updates Simple application from start to finish using a virtual directory Behind.
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
10 – 12 APRIL 2005 Riyadh, Saudi Arabia. Building multi-lingual ASP.Net application that handle western languages and Arabic with a single code base.
Create Windows ® Applications with.NET Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft.
About These Slides This slide set is designed to be used with the OMA sample application It is recommended you follow the steps outlined in the “Preparing.
Localization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation.
WEB320 Migrating ASP.NET 1.x Applications to ASP.NET 2.0 Stefan Schackow Program Manager Web Platform and Tools Team Microsoft Corporation.
Internationalization in ASP.NET 2.0. SQL Server 2005 – Data Columns Use Unicode datatypes in: Table columns, CONVERT() and CAST() operations Use Unicode.
VITALE, CATURANO & COMPANY LTD Microsoft SharePoint Web Part Development Overview VITALE, CATURANO & COMPANY LTD SharePoint Developer Series – Web Part.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
PAGE DIRECTIVES. Page Directives  They are instructions, inserted at the top of an ASP.NET page, to control the behavior of ASP.NET pages.  So it is.
DEV330 Visual Studio.NET IDE Tips and Tricks Billy Hollis Author / consultant.
Graphical Enablement In this presentation… –What is graphical enablement? –Introduction to newlook dialogs and tools used to graphical enable System i.
1 Visual Basic “Whidbey”: RAD for the Visual Basic Developer Jay Schmelzer and Shamez Rajan Program Manager Microsoft Corporation Jay Schmelzer and Shamez.
Configuring and Deploying Web Applications Lesson 7.
Web Development in Microsoft Visual Studio 2013 / 2015.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
Extending SharePoint through Web Parts and ASP.NET 최승현 대리 한국마이크로소프트.
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
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.
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
ASP.NET 2.0 Mohammed Abdelhadi Developer.NET Evangelist Microsoft Corporation.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
ClickOnce Deployment (One-click Deployment)
Introduction ITEC 420.
DotNetSpider Editor Hefin Dsouza
Metropolia 2013 C# programming and .NET framework
Globalization support in ASP.NET
Haritha Dasari Josue Balandrano Coronel -
Developing International Applications with Visual Studio 2005
ASP.NET 2.0 Overview Created By: Ajay Bahoriya.
ClickOnce Deployment (One-click Deployment)
Windows Forms in Visual Studio 2005: An in-depth look at key features
Presentation transcript:

Creating Multi-lingual Applications and Websites with Microsoft Visual Studio 2005 Achim Ruopp International Program Manager Microsoft Corporation

Agenda  Resource Improvements  Strongly Typed Resources  Fallback to Satellite Assembly  Editing Resources  ASP.NET Localization  Detecting the Browser Language  Declarative Localization Model with designer support  Extensibility  Deployment  Bidirectional Web Pages  Smart Client Applications  Windows Forms  Table Layout/Grid Layout Controls  Bidirectional Languages  Performance Improvements  ClickOnce Deployment

Visual Studio and.NET Framework Versions Visual Studio.NET.NET Framework v1.0 Visual Studio.NET 2003.NET Framework v1.1 Visual Studio 2005 (code name: Whidbey).NET Framework v2.0 (code name: Whidbey)

Strongly Typed Resources  Resources have types  Strings  Boolean  Images  Audio Files  …  Strongly Typed Resources  What are they?  Provide ability to creates classes containing read-only properties for resources  Benefits:  Eliminates mismatches between code and resource identifiers  Provides Intellisense on resource identifiers  ResourceManager is created for you  No need to cast objects to other types

Resources Then and Now private ResourceManager rm; rm = new ResourceManager("MyImages", this.GetType().Assembly); PictureBox.Image = (System.Drawing.Image)rm.GetObject("MyImage"); PictureBox.Image = ResourceFilename.MyImage;.NET Framework v1.0/v1.1.NET Framework v2.0

Fallback To Satellite Assembly  Fallback  Best fit UI language for user (CurrentUICulture)  Example: fr-CA → fr → fallback (e.g. de)  Additional fallback resource location  v 1.0/1.1 – ResourceManager only loaded fallback resources from the main assembly  v 2.0 – Adds ability to build fallback resources in a satellite assembly  [assembly: NeutralResourcesLanguageAttribute("de", UltimateResourceFallbackLocation.Satellite)]  Clean separation of code and user interface  Useful for servicing  Can potentially reduce download size for updates

Editing Resources  New Resource Editor  Integrated in Visual Studio 2005  For.resx format  Uses link syntax for complex type resources (images, sounds, …)  XML editors and localization tools can still be used  More on Windows Forms and ASP.NET resource editing later

Creating and Using Resources

ASP.NET Localization  v. 1.0/1.1 .NET resource model can be used  No design time assistance  v. 2.0  Uses.NET resource model  Provides a simple declarative model for localization  Automatic generation of resources in designer  Editing of resources using the resource editor  Server side compilation of.resx files  Auto-detection of browser culture

Detecting the Browser Language  HTTP Accept-Language header  v 1.0/1.1  Write code to detect browser language  Specify preferred culture in web.config, page or code  2.0  Use “auto” for automatically detecting browser language  Can override in InitializeCulture()  It is still possible to specify preferred culture in web.config, page or code

ASP.NET Resources  Local Resources  Use for page resources  Stored in \App_LocalResources folder  Generated through the designer  Tools/Generate Local Resources command used in design view of the page  Global Application Resources  Use for global strings or binary types  Stored in \App_GlobalResources folder  Strongly-typed, available to all pages through Resources member  Default Resource format  Author.resx in the resource or XML editor  Other formats possible through extensibility

Retrieving Resources  Declaratively  Explicit or implicit expressions  Programmatic  GetLocalResourceObject()/GetGlobalResourceObject()  System.Web.UI.TemplateControl Class  System.Web.HttpContext Class foo.aspx \App_LocalResources foo.aspx.resx foo.aspx.fr.resx Declaratively: " /> Programmatically: foo.Text = (string)GetLocalResourceObject(“foo");

Expressions  Declarative syntax  Access local or global resources  Interpreted at parse time  Explicit and implicit forms  Can be mixed, but should not collide  Designer creates implicit expression syntax  Explicit expressions can be edited in Expressions property of controls Explicit form: ” /> Implicit form: meta:ResourceKey=“keyprefix”

Extensibility  Other resource formats  Databases  Existing XML formats  …  Option 1: Localization expressions can be extended  Subclass ResourceProviderFactory  Allows design-time support for custom resource formats  Option 2: Create expression builder for new resource format  Subclass System.Web.Compilation.ExpressionBuilder  Design-time support only through ExpressionEditor  Deployment of e.g. a database is more difficult

Deployment  ASP.NET v2.0 has 3 compilation models  Uncompiled  Source files including.resx files are copied to server  Resources are compiled on server  Compiled resources are cached on first use  Precompiled excluding markup  Deploy.resx/.aspx files like in uncompiled case  Page design changeable  Global resource satellite assemblies precompiled  Precompiled including markup  Page design cannot be changed  Everything precompiled into assemblies  Additional languages can be added in all 3 models  Application domain needs to be restarted

Bidirectional Web Pages  Direction property on  Can be explicitly defined  Can be loaded using a resource expression  Useful for mixed left-to-right/right-to-left pages  Full right-to-left pages  Set DIR attribute on HTML tag using an explicit resource expression RightToLeft

ASP.NET Localization

Windows Forms Localization v1.0/v1.1  Each form has a Localizable property  Creates single.resx file for default resources  Each form has Language property  Creates one additional.resx file per selected language  Edit source/localized.resx files in  Visual Studio Windows Forms designer  XML editor  WinRes tool (.NET Framework SDK tool)  Images serialized into.resx file  Pulled each localizable property from the.resx file  Built satellite assemblies directly in VS  Setup projects available in 9 languages

Windows Forms Localization v2.0  Localizable/Language properties remain the same  One.resx file per form per language  Edit source/localized.resx files in  Visual Studio Windows Forms designer  WinRes tool (.NET Framework SDK tool)  Visual Studio Resource Editor  XML editor  Images  Linked into.resx files rather than serialized  Default to application-wide.resx file  New code generation using the ComponentResourceManager improves performance  New layout functionality reduces resizing during localization  Deploy Click Once projects in any language

Localize Without Resizing  v1.0/v1.1  Use docking and anchoring properties  new layout controls in v2.0  Use TableLayoutPanel for  Resizing a group of controls proportionally  Dynamically generating UI with customizable fields  Creating a fixed size UI while still allowing localization  Use FlowLayoutPanel for  Creating a series of horizontal controls which may wrap vertically but aren’t proportional to each other  Mechanism for “bumping” controls relative to other controls

RightToLeft Languages  RightToLeft property (v 1.0/v 1.1/v 2.0)  Determines reading order for text  Affects layout for some controls  RightToLeftLayout (v 2.0)  Determines layout of controls  Form, TabControl, TreeView, ListView, TrackBar, ProgressBar, MonthCalendar and DateTimePicker  Does not inherit down control hierarchy  Controls support full “mirroring”  Set both RightToLeft and RightToLeftLayout  Determining text direction for culture  CultureInfo.TextInfo.IsRightToLeft

Click Once  New deployment mechanism  versioning  update service  installation over the web  …  Deploy multiple languages from a single project  Language property determines  language satellite assemblies  language external dependencies  ClickOnce language resources (.xml files)  Can extend ClickOnce resource languages by localizing setup.xml

Layout Controls and ClickOnce

References  Visual Studio 2005/.NET Framework v2.0   Microsoft Globaldev website   Newsgroup  news:microsoft.public.dotnet.internationalization news:microsoft.public.dotnet.internationalization  Blogs    

Appendix ASP.NET Localization Expressions

Implicit Expressions  Used to partially or fully localize an ‘object’ with minimal syntax  Controls, sub-objects, page directive  Only used to access local resources  Generated by the designer

Implicit Expressions  Runtime  Default.resx interrogated for keyprefix and properties set  Key: filter, keyprefix, control property, sub-property  Design-time  Control properties marked [Localizable(true)] are ‘pushed’ to.resx Welcome to the site true

Explicit Expressions  Used on any control or object property  Fine-grained handling for properties which are not localizable by default  Can be used for HTML attributes  Access global or local resources  Runtime  Used to obtain resource value and perform property assignment  Design-time  Developer can create expressions against control properties in “Expressions…” dialog