08 localization and globalization in windows runtime apps

download 08   localization and globalization in windows runtime apps

of 28

  • date post

  • Category


  • view

  • download


Embed Size (px)


Building Apps for Windows Phone 8.1 Jump Start . Videos at: http://channel9.msdn.com/Series/Building-Apps-for-Windows-Phone-8-1

Transcript of 08 localization and globalization in windows runtime apps

  • 1. WinRT Apps 29 April 2014 Building Apps for Windows Phone 8.1 Jump Start

2. Afrikaans Basque (Basque) Galician Hausa 26 new languages were added with Windows Phone 8 50 languages supported in4 new languages added in 3. See Details Here: http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/06/21/tips-for-localizing-and-monetizing-your-app-for-windows-phone-users.aspx Top primary user languages for all app downloaded (Jan-Jun 2013) 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. 4. See Details Here: http://blogs.windows.com/windows_phone/b/wpdev/archive/2013/06/21/tips-for-localizing-and-monetizing-your-app-for-windows-phone-users.aspx Number of app downloads per market, Jan-Jun 2013 5. 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 6. Read resource strings from code also: Use resource strings from XAML: var loader = new Windows.ApplicationModel.Resources.ResourceLoader(); var string = loader.GetString('Farewell'); 7. 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 8. // 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; 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 9. // Determine the current users default currency. var userCurrency = Windows.System.UserProfile.GlobalizationPreferences.Currencies[0]; // Number to be formatted. var fractionalNumber = 12345.67; // 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; Different cultures format numbers differently Use NumberFormatting to display decimal, percent/permille numbers, currencies 10. Calendar 11. 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, Office, Azure, System Center, Dynamics 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.