Download presentation
Presentation is loading. Please wait.
Published byAnis Mitchell Modified over 6 years ago
1
Localization and Globalization in Windows Runtime Apps
4/23/2018 WinRT Apps Building Apps for Windows Phone 8.1 Jump Start Building Windows Runtime Apps using C# and XAML Localization and Globalization in Windows Runtime Apps Andy Wigley @andy_wigley Matthias Shapiro @matthiasshap 29 April 2014 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
In this module… Global market opportunity World-ready app demo
Build 2012 4/23/2018 In this module… Global market opportunity World-ready app demo Developing a localized Windows Runtime app Globalization Translation © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
Why globalize/localize your apps?
4
Global Windows Phone Stores: 191 markets
4/23/2018 Global Windows Phone Stores: 191 markets © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
Support for 54 languages 50 languages supported in Windows Phone 8.0
4/23/2018 Support for 54 languages 50 languages supported in Windows Phone 8.0 4 new languages added in Windows Phone 8.1 54 Languages Afrikaans Albanian Arabic Azerbaijani (Latin) Basque (Basque) Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English (UK) English (US) Estonian Filipino Finnish French (Canada) French (France) Galician German Greek Hausa Hebrew Hindi Hungarian Indonesian Italian Japanese Kazakh Korean Latvian Lithuanian Macedonian Malay Norwegian (Bokmål) Persian Polish Portuguese (BR) Portuguese (PT) Romanian Russian Serbian (Latin) Slovak Slovenian Spanish (Mexico) Spanish (Spain) Swedish Turkish Ukrainian Uzbek (Latin) Vietnamese 26 new languages were added with Windows Phone 8 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
Top primary user languages for all app downloaded (Jan-Jun 2013)
4/23/2018 Priority languages Offering your app in English only covers only 25% of Windows Phone users. Adding Mandarin and Spanish increases coverage to ~60%, and adding Russian, Italian, Portuguese (Brazil), and French covers the large majority of all Windows Phone users. Top primary user languages for all app downloaded (Jan-Jun 2013) 8 languages supported Average, top 15 highest grossing apps (WP7 & 8) See Details Here: © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
Number of app downloads per market, Jan-Jun 2013
4/23/2018 Priority markets Number of app downloads per market, Jan-Jun 2013 12 of top 15 apps are published in >= 187 markets. China and Latin America download twice as many apps as the US See Details Here: © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
User facing language improvements
9
New Language Control Panel Add multiple languages to phone
4/23/2018 New Language Control Panel Add multiple languages to phone All 54 supported UI languages to be pre-installed on most phones Enable multiple languages and sort them by order of preference Languages will be listed by locale, enabling Region format to automatically match phone language Add languages which are not currently supported for UI, to be used for apps and services which support that language Continue to auto-download language packs, containing text prediction and speech files, to align with selected languages © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
10
Demo: Language/Region Settings in Windows Phone 8.1
11
Developing a localized app
12
Determining language codes
4/23/2018 Determining language codes Users specify their language preference list in Phone Settings The developer decides which application language list to support A language is represented as a BCP-47 language tag Can support a regional language (e.g. “en” – English) as well as regional variants (e.g. “en-US”, “en-GB”, “en-HK” etc) At runtime, Windows handles the matching of the users’ language preferences against the language resources packaged in the app For example, user preference of “en-US” matches, in priority order “en-US”, “en”, “en-GB” etc If no resources can be matched, the default language of the application is used © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
Separate string resources for each locale
Build 2012 4/23/2018 Separate string resources for each locale Use resource strings from XAML: <TextBlock x:Uid="Greeting" Text="" /> Read resource strings from code also: var loader = new Windows.ApplicationModel.Resources.ResourceLoader(); var string = loader.GetString('Farewell'); © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
14
Localizing Fields that are defined in the Manifest
4/23/2018 Localizing Fields that are defined in the Manifest You can localize your apps’ display name, description, and other identifying features, which are in the package manifest file Set its value to ms-resource:TokenName, where TokenName is a resource name in your resource files © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
DPI, language and accessibility-aware images
4/23/2018 DPI, language and accessibility-aware images Windows supports automatic resource loading From code or markup, you simply refer to imagname.ext without worrying about scale, language or other resource qualifiers Source=“Images/logo.png” rather than Source=“Images/en-US/logo.scale-180_contrast-white.png See MSDN topic: How to name resources using qualifiers © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
16
Multilingual App Toolkit (MAT)
4/23/2018 Multilingual App Toolkit (MAT) Easy to use localization tool for WP SDK Integrates with Visual Studio 2013 with Windows Phone SDK to provide Windows Phone Store apps with translation support, translation file management, and localization editing Helps to verify and note changes in resources over time Provides a UI for choosing languages Supports the localization industry-standard XLIFF file format Provides a pseudo-language engine to identify translation issues at development Connects with the Microsoft Translator for quick translation suggestions Quickly expand your customer base and markets with added languages © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
17
Demo: Multilingual App Toolkit (MAT)
18
Microsoft language assets
Build 2012 4/23/2018 Microsoft language assets Terminology: lookup & downloads UI Translations: Microsoft products via MSDN and TechNet Style Guides: Collections of rules that define language and style conventions © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
4/23/2018 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
20
4/23/2018 Globalization © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
21
Globalization APIs Windows.Globalization.Calendar
Build 2012 4/23/2018 Globalization APIs Windows.Globalization.Calendar GetTimeZone() ChangeTimeZone() TimeZoneAsString() IsDaylightSavingTime() Windows.Globalization.DateTimeFormatting Format(DateTime.Now, "America/Guatemala“) © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Format dates and times appropriately
4/23/2018 Format dates and times appropriately Standard date and time picker controls conform to users’ selected region To display dates or times yourself, use Date/Time and Number formatters to automatically display the user's preferred format for dates, times and numbers // Use the Windows.Globalization.DateTimeFormatting.DateTimeFormatter class // to display dates and times using basic formatters. var sdatefmt = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("shortdate"); var stimefmt = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("shorttime"); // Obtain the date that will be formatted. var dateToFormat = DateTime.Now; // Perform the actual formatting. var sdate = sdatefmt.Format(dateToFormat); var stime = stimefmt.Format(dateToFormat); // Results for display. var results = "Short Date: " + sdate + "\n" + "Short Time: " + stime; © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
23
Format numbers and currencies appropriately
4/23/2018 Format numbers and currencies appropriately Different cultures format numbers differently Use NumberFormatting to display decimal, percent/permille numbers, currencies // Determine the current users default currency. var userCurrency = Windows.System.UserProfile.GlobalizationPreferences.Currencies[0]; // Number to be formatted. var fractionalNumber = ; // Currency formatter using the current users preference settings for number formatting. var userCurrencyFormat = new Windows.Globalization.NumberFormatting.CurrencyFormatter(userCurrency); var currencyDefault = userCurrencyFormat.Format(fractionalNumber); // Create a formatter initialized to a specific currency. // In this case it's the Euro with the default number formatting for France. var currencyFormatEuroFR = new Windows.Globalization.NumberFormatting.CurrencyFormatter("EUR", new[] { "fr-FR" }, "FR"); var currencyEuroFR = currencyFormatEuroFR.Format(fractionalNumber); // Results for display. var results = "Fixed number (" + fractionalNumber + ")\n" + "With user's default currency: " + currencyDefault + "\n" + "Formatted Euro (fr-FR defaults): " + currencyEuroFR; © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
24
Use a culturally appropriate calendar
4/23/2018 Use a culturally appropriate calendar The calendar differs across regions and languages Standard date and time picker controls conform to users’ preferred calendar format Use Windows.Globalization.Calendar class to work directly on calendar dates; gives an appropriate calendar representation for the given culture, region, and calendar type © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
25
Demo: A World-Ready App Demo Calendar
26
Modern Resource Technology (MRT)
27
4/23/2018 MRT Bundles MRT determines correct language resources and image assets for platform and device settings AppX packages can be packaged as fatpacks or bundles Fatpacks contain all binaries and assets in a single package (Same for XAPs) Bundle is a package containing resource packages specific to language or device specifications Benefits User downloads only the portions of a bundle applicable to their device Package consumes less space on users device For more: See Session 21: App Packaging and Publication © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.