Presentation is loading. Please wait.

Presentation is loading. Please wait.

Reach a worldwide audience by building a world-ready app

Similar presentations


Presentation on theme: "Reach a worldwide audience by building a world-ready app"— Presentation transcript:

1 Reach a worldwide audience by building a world-ready app
1/15/2019 4:18 PM APP-411T Reach a worldwide audience by building a world-ready app Kipling Knox Group Program Manager Microsoft Corporation © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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 Agenda Why is world-readiness important for you?
What does a world-ready app look like? Four easy steps to build a world-ready app You’ll leave with examples of how to Manage file and string resources in your app Apply formatting in JavaScript Get more information about advanced localization

3 Why is world-readiness important?

4 When you make a world-ready app, you significantly expand your customer base. Windows 8 makes this easy.

5 Most of your potential customers probably speak a different language than you
Internet World Stats Copyright © 2011, Miniwatts Marketing Group.

6 What does it mean to be “world-ready?”
Content appears in the language of your customers Data, like dates and times, are formatted correctly by culture Text input just works for all languages

7 What’s new in Windows 8? Your customers just list their languages, and Windows retrieves the right resources and formats A client-side resource management system for HTML/JavaScript (no need to call a server every time you want a string) The same resource management system supports all languages (JS, C#,C++) You don’t have to manually manage images for DPI or high-contrast changes

8 Weather app, world-ready
demo Weather app, world-ready

9 4 easy steps to make your app world-ready

10 Steps to make your app world-ready
Verify fallback language Structure resources and use localization APIs Use formatting APIs for culturally-sensitive data types Translate content

11 Step 1 Verify your app’s fallback language

12 Verify the fallback language of the app
In Visual Studio, verify the fallback language is what you want

13 Step 2 Separate resources from code and use localization APIs

14 Approaches to resource management
File-based resource management Retrieving a string directly using ResourceLoader.getString() Managing and retrieving strings naturally in HTML or XAML Localizing your app’s presence in the system through the manifest

15 Manifest File-based Markup getString()

16 File-based resource management
Simplest method of resource management Works for images, media, HTML, CSS Steps (HTML or XAML) Create alternate file assets for different languages and DPI Use simple file / folder naming conventions Ensure your elements are tagged correctly Build

17 demo File resources

18 Retrieving a string directly using getString()
Lowest-overhead approach to getting a string Useful for run-time operations Steps: Move strings from markup to resource file (resJSON or ResW) Use ResourceLoader.getString() to retrieve the resource by name Build

19 Retrieving a string directly using ResourceLoader.getString()
demo Retrieving a string directly using ResourceLoader.getString()

20 Managing and retrieving strings naturally in HTML or XAML
Best practice if you have more than a few strings Requires a resources file, a reference to the res.js toolkit, and the addition of attributes to markup Steps: Move strings from markup to resource file In HTML, add a few lines of code to leverage res.js toolkit Mark resource references using data-win-res attribute Build

21 Managing localized string resources in HTML
demo Managing localized string resources in HTML

22 Localizing your app’s presence in the system
Your app content is also represented in the Windows Store, on the Start screen, in search, and in its splash screen You start by localizing your manifest Steps: Add strings to resource file Add references to the manifest using ms-resource URI scheme Build

23 Localizing your app’s presence in the system through the manifest
demo Localizing your app’s presence in the system through the manifest

24 Additional scenarios As you build more complex apps, you may want to
Integrate localization with fragment loading Integrate data-binding with localized strings Use localization techniques to interact with multi-lingual web services Use localized SDK controls

25 Step 3 Use formatting APIs for culturally-sensitive data types

26 Examples: displaying date and time

27 Formatting for culturally-sensitive data
NEW: JavaScript support for formatting dates and times numbers currencies calendar and clock conventions basic information about languages, regions, calendars C# apps can still use ToString() and System.Globalization C++ apps can still use NLS

28 Basic date/time formatting
// Format using the built-in named long/short formats var dtf = Windows.Globalization.DateTimeFormatting; // longdate format var dateformat = new dtf.DateTimeFormatter("longdate"); var datestring = dateformat.format(new Date()); // e.g., "Wednesday, September 14, 2011" // e.g., "miércoles, septiembre 14, 2011" // shorttime format var timeformat = new dtf.DateTimeFormatter("shorttime"); var timestring = timeformat.format(new Date()); // e.g., "2:45 PM" © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

29 Use formatting APIs in JavaScript to format a long date
demo Use formatting APIs in JavaScript to format a long date

30 Step 4 Translation

31 Translation: a range of options
“DIY” with translation glossaries Non-professional translators Professional localization vendors

32 In closing…

33 For more information RELATED SESSIONS
Building World Ready Metro-style Apps with XAML(Tim Heuer) HELPFUL MATERIALS Code sample: Application resources and localization Code samples for formatting date/time, numbers, calendar

34 When you make a world-ready app, you significantly expand your customer base. Windows 8 makes this easy.

35 thank you Feedback and questions http://forums.dev.windows.com
Session feedback

36 1/15/2019 4:18 PM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista 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.

37


Download ppt "Reach a worldwide audience by building a world-ready app"

Similar presentations


Ads by Google