Developing International Applications with Visual Studio 2005

Slides:



Advertisements
Similar presentations
Advanced.Net Framework 2.0 David Ringsell MCPD MCSD MCT MCAD.
Advertisements

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.
Developing Arabic Applications with Visual Studio 2005 Dina Lasheen Program Manager – Developer Division.
SpreadsheetML Basics.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
Thomas Palmié Architect Microsoft Schweiz Implementierung eines mehrsprachigen Intranets basierend auf SharePoint 2010.
The Web Warrior Guide to Web Design Technologies
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
26 April 2001 Unicode and Windows XP, IUC 18 (Hong Kong) Unicode and Windows XP Cathy Wissink Program Manager, Globalization Windows Division Microsoft.
Creating Multi-lingual Applications and Websites with Microsoft Visual Studio 2005 Achim Ruopp International Program Manager Microsoft Corporation.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
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.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
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.
Globalization Support in Microsoft.NET Framework François Liger Program Manager Microsoft Corporation.
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.
Microsoft Dynamics NAV 2009 and Architecture Overview Name Title Microsoft Corporation.
Localization Support in Microsoft.NET Framework François Liger Program Manager 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.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
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.
BlackBerry Applications using Microsoft Visual Studio and Database Handling.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
Configuring and Deploying Web Applications Lesson 7.
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.
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.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Dive Into® Visual Basic 2010 Express
ASP.NET Forms.
Chapter 2: The Visual Studio .NET Development Environment
Building world-ready Metro style apps with XAML
Creating Oracle Business Intelligence Interactive Dashboards
5/20/2018 2:53 AM © 2006 Microsoft Corporation. All rights reserved.
Metropolia 2013 C# programming and .NET framework
Globalization support in ASP.NET
2010 Microsoft BI Conference
Jon Flanders Senior Consultant MCW Technologies
Upgrading Your C# Programming Skills to Be a More Effective Developer
Haritha Dasari Josue Balandrano Coronel -
Microsoft Dynamics.
Entity Based Staging SQL Server 2012 Tyler Graham
Reaching more customers with accessible Metro style apps using HTML5
Translation Workspace File Filters
WEB PROGRAMMING JavaScript.
Building event-driven, long-running apps with Windows workflow
Microsoft Dynamics.
Tech·Ed North America /17/2019 1:47 AM
Microsoft SharePoint Conference 2009 Jon Flanders
Visual Studio 2010 SharePoint Development Tools Overview
2010 Microsoft BI Conference
Build /23/2019 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Web Development Using ASP .NET
WebDAV Design Overview
TechEd /27/ :51 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
How to organize and document your classes
5/8/2019 3:20 AM bQuery-Tool 3.0 A new and elegant way to create queries and ad-hoc reports on your Baan/Infor ERP LN data. This Baan session is a query.
ADO.NET Entity Framework
ASP.NET 2.0 Overview Created By: Ajay Bahoriya.
Programming with Microsoft Visual Basic 2008 Fourth Edition
Office 365 Development July 2014.
Windows Forms in Visual Studio 2005: An in-depth look at key features
Mark Quirk Head of Technology Developer & Platform Group
Presentation transcript:

Developing International Applications with Visual Studio 2005 11/23/2018 7:01 AM Developing International Applications with Visual Studio 2005 Marin Millar Globalization Manager Microsoft © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Overview Goals Introduce new globalization and localization features in .NET Framework 2.0 and Visual Studio 2005 Topics .NET Runtime Windows Forms ASP .NET 26th Internationalization and Unicode Conference 2

.NET Framework 2.0 Custom Cultures Supplementary Character Support IDN Normalization New Calendars Resources 26th Internationalization and Unicode Conference 3

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Custom Cultures Custom culture examples Replacement Cultures Replacing or adding customizations to existing cultures Ex: ja-JP-MyCompany or en-US-24hr Supplemental Cultures New combination of language and location es-US for Spanish in the US Tagalog in Guam 26th Internationalization and Unicode Conference 4 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Custom Culture in 1.0/1.1 Set CurrentCulture and CurrentUIculture to different values Example: es-US (Spanish-United States) set CurrentThread.CurrentUICulture to es (for resources) set CurrentThread.CurrentCulture to en-US (for formatting) Disadvantages Date text is English, unless DTFI is overridden Override CultureInfo to create custom culture Existing custom culture sample on GotDotNet http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=a193b952-2e44-45ed-811d-c1fabf2f6e8a Devs have to create their own implementations. Solution is not supported in the CultureInfo mechanism i.e., not included in cultures list for CultureInfo.GetAllCultures App domain limitation: custom culture must be recreated across app domains 26th Internationalization and Unicode Conference 5

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Custom Cultures in 2.0 Goal: Easily define new cultures Easily deploy new cultures Custom cultures are equivalent to pre-defined cultures Return all cultures, including custom cultures CultureInfo.GetCultures(CultureTypes.AllAvailableCultures) Return custom cultures only CultureInfo.GetCultures(CultureTypes.UserCustomCultures) Standardized solution No need to make separate DTFI updates change date display language No limitations across app domains 26th Internationalization and Unicode Conference 6 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Custom cultures Limitations String name “en-US-MyCompany” is unique; LCID is not One LCID per custom culture LCID assigned to user-default locale Changing the user-default locale to custom culture: String name changes LCID does not change No UI designer for custom cultures Cannot use custom classes for CultureInfo classes such as CompareInfo, TextInfo, Calendar Can customize cultures to use existing classes 26th Internationalization and Unicode Conference 7 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Personalize A Culture CultureAndRegionInfoBuilder carib = new CultureAndRegionInfoBuilder(new CultureInfo("en-US", false), null, “en”, “US”, “MyCompany"); carib.DateTimeFormat.LongTimePattern = “HH:mm:ss”;    carib.Register(); CultureInfo ci = new CultureInfo("en-US-MyCompany”); //-OR- Save and register a file: carib.Save("c:\\temp\\myculture.xml"); CultureAndRegionInfoBuilder.Register(“c:\\tmp\\myculture.xml”); 26th Internationalization and Unicode Conference 8 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Create A New Culture CultureInfo ciES = new CultureInfo("es-ES"); CultureInfo ciUS = new CultureInfo("en-US"); CultureAndRegionInfoBuilder carib = new CultureAndRegionInfoBuilder(ciEs, null, "es", "US"); carib.NumberFormat.CurrencySymbol = ciUS.NumberFormat.CurrencySymbol; carib.DateTimeFormat = ciUS.DateTimeFormat; carib.DateTimeFormat.DayNames = ciES.DateTimeFormat.DayNames; carib.DateTimeFormat.MonthNames = ciES.DateTimeFormat.MonthNames; carib.DateTimeFormat.AbbreviatedDayNames = ciES.DateTimeFormat.AbbreviatedDayNames; carib.DateTimeFormat.AbbreviatedMonthNames = ciES.DateTimeFormat.AbbreviatedMonthNames ; carib.Register(); CultureInfo ci = new CultureInfo("es-US"); 26th Internationalization and Unicode Conference 9 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Developing a Custom Culture Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 10 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

International Domain Names Developing International Applications with Visual Studio 11/23/2018 7:01 AM International Domain Names New Standard (IDN) http://www.ietf.org/html.charters/idn-charter.html Enables non-ASCII domain names  www.loréal.com www.日本語.com IDN Mapping class containing IDN conversion APIs System.Globalization.IdnMapping GetAscii and GetUnicode provide host name conversion between native Unicode and Punycode Limitations This support does not cover IRIs Standard is not yet finalized Not yet implemented in System.Net URI/IRI classes 26th Internationalization and Unicode Conference 11 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM International Domain Names Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 12 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Normalization Support 4 normalization forms (C,D,KC,KD) Composition, shortest form Decomposition, longest form Normalize strings public string Normalize(System.Text.NormalizationForm normalizationForm) Verify normalization or normalization form public bool IsNormalized(System.Text.NormalizationForm normalizationForm) Implementation conforms to sample in Unicode Tech Report 15: http://www.unicode.org/reports/tr15/. 26th Internationalization and Unicode Conference 13 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Supplementary Characters Developing International Applications with Visual Studio 11/23/2018 7:01 AM Supplementary Characters v. 1.0, 1.1 Methods on StringInfo to parse characters and walk text elements v. 2.0 Additional methods on StringInfo to find surrogate pairs in substrings public string SubstringByTextElements(int startingTextElement, int lengthInTextElements) New property to determine length of strings containing surrogate pairs public int LengthInTextElements [get] Char.IsLetter recognizes surrogate pairs New methods in System.Char class to detect high and low surrogate codepoints New methods to convert between Unicode and UTF-32 Use Unicode or UTF-8 for better performance 26th Internationalization and Unicode Conference 14 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Supplementary Characters Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 15 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM New Calendars Enable date conversions between regional calendars New algorithms include: UmAlQura calendar Implementation of Hijiri calendar Jalaali calendar Calander used in Farsi communities East Asian Lunisolar calendars PRC Taiwan Japan Korea 26th Internationalization and Unicode Conference 16 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Resource Model Additions Developing International Applications with Visual Studio 11/23/2018 7:01 AM Resource Model Additions Strongly Typed Resources What are they? Creates classes containing read-only properties for resources Benefits: Provides Intellisense on resource identifiers No need to create a ResourceManager Eliminates mismatches between code and resource identifiers No need to cast objects to other types 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 public NeutralResourcesLanguageAttribute(string cultureName, System.Resources.UltimateResourceFallbackLocation location) 26th Internationalization and Unicode Conference 17 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Resource Performance Suggestions Developing International Applications with Visual Studio 11/23/2018 7:01 AM Resource Performance Suggestions Put satellite assemblies in the GAC Satellite assemblies in the GAC are FAR more performant Use ResourceManager.GetStream for image resources Returns an unmanaged memory stream for images Far more performant than GetObject public System.IO.UnmanagedMemoryStream GetStream(string name) Use Culture-Neutral Images Loading images is expensive Using culture-neutral images can save a lot on performance Use NeutralLanguageResources Attribute Specifies the language of the default resources Eliminates probing for the neutral language resources 26th Internationalization and Unicode Conference 18 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Strongly Typed Resources Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 19 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Windows Forms Localization 1.0 Each form has a localizable property Create single .resx file per form Edit source/localized .resx files in the Windows Forms designer or XML editor 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 26th Internationalization and Unicode Conference 20

Windows Forms Localization 2.0 Localizable property remains the same One .resx file per form Images Linked into resx files rather than serialized Default to app wide .resx file Edit source/localized resources in resource designer New layout functionality reduces resizing during localization Deploy Click Once projects in any language 26th Internationalization and Unicode Conference 21

Localize Without Resizing Developing International Applications with Visual Studio 11/23/2018 7:01 AM Localize Without Resizing 1.0/1.1 Use docking and anchoring properties 2.0 Two new controls 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 26th Internationalization and Unicode Conference 22 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Using Layout Controls Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 23 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

RightToLeft Languages Developing International Applications with Visual Studio 11/23/2018 7:01 AM RightToLeft Languages v. 1.0/1.1 Controls supported RightToLeft reading order Partial RightToLeft alignment and layout v. 2.0 New RightToLeft behavior for: Form, Treeview, StatusBar, ListView, Panel, ProgressBar, Tab, Splitter Controls support full “mirroring” RightToLeft reading order RightToLeft alignment RightToLeft layout 26th Internationalization and Unicode Conference 24 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Click Once New deployment mechanism Deploy multiple languages from a single project Language property determines: language satellite assemblies language external dependencies Click once language resources (.xml files) Can extend ClickOnce resource languages by localizing setup.xml 26th Internationalization and Unicode Conference 25

ASP .NET Localization v. 1.0/1.1 v. 2.0 Used .NET resource model No design time assistance v. 2.0 Uses .NET resource model Provides a simple declarative model for localization Design time resource generation Edit using VS resource editor Server side compile of .resx files Tag to auto-detect browser culture 26th Internationalization and Unicode Conference 26

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Handling Cultures v. 1.0/1.1 Write code to detect browser language Specify preferred culture in web.config, page or code 2.0 Use “auto” to automatically detect browser language <%@ Page culture=“auto:fr” uiculture=“auto:fr-FR” .. %> 26th Internationalization and Unicode Conference 27 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Resources Resource format Global Application Resources Local Resources Use .resx for authoring .NET xml based resource format Global Application Resources Use for global strings or images Stored in \Resources folder Strongly-typed, available to all pages through Resources member. Local Resources Use for page resources Stored in \LocalResources folder Generated through the designer 26th Internationalization and Unicode Conference 28

Handling Local Resources Declaratively Explicit or non-explicit expressions Programmatically System.Web.UI.TemplateControl.GetPageResourceObject() foo.aspx \LocalResources foo.aspx.resx foo.aspx.fr.resx Declaratively: <asp:label runat=“server” id=“foo” text=“<%$ Resources:Title, ‘Welcome’ %>” /> <asp:label runat=“server” meta:ResourceKey=“TitleKey” %> Programmatically: foo.Text = (string)GetPageResourceObject(“Title”, ‘Welcome”); 26th Internationalization and Unicode Conference 29

Bi-directionality Direction property on <asp:panel> Marked Localizable(true) Designer service generates property value in RESX Can be explicitly defined Can be auto assigned through non-explicit expression handling <asp:panel runat=“server” meta:resourcekey=“MainTitle” /> <data name=“MainTitle.Direction” type=“.. ContentDirection”> <value>RightToLeft</value> </data> 26th Internationalization and Unicode Conference 30

Developing International Applications with Visual Studio 11/23/2018 7:01 AM ASP .NET Localization Marin Millar Globalization Manager Developer Division 26th Internationalization and Unicode Conference 31 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Developing International Applications with Visual Studio 11/23/2018 7:01 AM Microsoft Newsgroup: microsoft.public.dotnet.internationalization Localization Partner Program http://www.vsippartners.com/programs/localization More Articles and Code http://www.microsoft.com/globaldev http://www.dotnetdashboard.net/Sessions/globalization.aspx http://msdn.microsoft.com/asp.net/community/authors/mlb/default.aspx?pull=/library/en-us/dnaspp/html/aspnet-globalarchi.asp 26th Internationalization and Unicode Conference 32 © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Expressions Declarative syntax Interpreted at runtime Access local or app resources Interpreted at runtime Tool handling in control designers and ‘Expressions …’ (binding) Runtime ‘parse-time’ feature but also support no-compile Explicit and non-explicit forms Explicit form: <%$ Resources:[class,]key[,’default’] %> <asp:label runat=“server” text=“<%$ Resources:MainTitle %>” /> <asp:button runat=“server” text=“<%$ Resources:MyStrings,OK_Key %>”/> Non-explicit form: Meta:ResourceKey=“keyprefix” <asp:label runat=“server” meta:resourcekey=“MainTitle” /> 26th Internationalization and Unicode Conference 33

Explicit Expressions Used on any control or object property Fine-grained handling for properties which are not localizable by default Access application 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 26th Internationalization and Unicode Conference 34

Non-explicit 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 26th Internationalization and Unicode Conference 35

Non-explicit 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 <asp:label runat=“server” meta:resourcekey=“MainTitle” /> <data name=“MainTitle.Text”> <value>Welcome to the site</value> </data> <data name=“MainTitle.Font.Bold” type=“.. Boolean”> <value>true</value> 26th Internationalization and Unicode Conference 36