SlideShare a Scribd company logo
Your app on every 
Windows Phone 8.1 device 
in the world 
20/10/2014
Who am I? 
20/10/2014 
Bart Lannoeye 
@bartlannoeye 
• MADN Board Member 
• Microsoft MEET Member 
• Full-time Win8 dev
• General localization best practices 
• Resources in WP8 vs WP8.1 RT 
• Multilingual App Toolkit 
• But we can do more ! 
• Universal Apps 
20/10/201 
4 
Agenda
• Sentences instead of single words 
• The {0} could not be synchronized. 
• Be aware of word order, or 1 vs multiple word parts 
• Provide enough space 
• Hint: English + 40% 
• Tip: test with ‘qps-ploc’ 
• Multiline, text wrapping, trimming 
• Watch out with re-use 
• ‘Text’ can be noun & verb 
• Use unique identifiers to access resources, as resource can 
change 
• Stick to a localization approach 
• Easiest: keep translations till last 
• Complexity: self-translated, outsourced, automated, … 
20/10/201 
4 
Localization best practices
Windows Phone 8 (SL) Windows Phone 8.1 RT 
20/10/201 
4 
Project setup
20/10/201 
4 
Demo
Windows Phone 8 (SL) Windows Phone 8.1 RT 
.resx files don’t update ! .xlf files update on rebuild 
machine generated translations 
20/10/201 
4 
Project setup
20/10/201 
4 
Demo
Windows Phone 8 (SL) 
• Generated class with 
classname = resources file 
• MyClass with public prop to 
expose the generated class 
• App.xaml: declare MyClass in 
Application.Resources 
• Text="{Binding 
Path=MyResources.Title, 
Source={StaticResource 
LocalizedStrings}}" 
• Adding a new resources file 
‘Inconsistent accessibility’ 
• Fix: use 
PublicResXFileCodeGenerato 
r 
20/10/201 
4 
Resources in XAML (1)
20/10/201 
4 
Demo
Windows Phone 8 (SL) Windows Phone 8.1 RT 
• Generated class with 
classname = resources file 
• MyClass with public prop to 
expose the generated class 
• App.xaml: declare MyClass in 
Application.Resources 
• Text="{Binding 
Path=MyResources.Title, 
Source={StaticResource 
LocalizedStrings}}" 
• <TextBlock x:Uid=“MyText” /> 
• In resource file: 
MyText.Text SomeText 
• Blackbox magic done for you 
20/10/201 
4 
Resources in XAML (2)
Windows Phone 8 (SL) Windows Phone 8.1 RT 
• Generated class with 
classname = resources file 
• Every resource is a static 
property 
• string text = 
AppResources.SomeText 
20/10/201 
4 
Resources in C#
20/10/201 
4 
Demo
Windows Phone 8 (SL) Windows Phone 8.1 RT 
• Generated class with 
classname = resources file 
• Every resource is a static 
property 
• string text = 
AppResources.SomeText 
• new ResourceLoader() 
or 
ResourceLoader 
.GetForCurrentView() 
• string text = 
_loader.GetString(key); 
• MyUid.Text -> MyUid/Text 
• Use id in ctor / GetFCV() to 
access a given resource file 
20/10/201 
4 
Resources in C#
• Download MAT: 
https://dev.windows.com/en-us/develop/multilingual-app-toolkit 
• Integrated with Visual Studio 
• Microsoft Language Portal integration 
• Localization from actual Microsoft Products (e.g. Office) 
• Machine Translator integration 
• Dedicated translator UI 
• XLIFF files: localization industry standard 
• Export – import files to send to 3rd party (xliff – csv) 
• Warning for updates, preventing accidental overwrites 
• Provides pseudo (qps-ploc) for testing 
20/10/201 
4 
Multilingual App Toolkit 
MAT v4 Tech Preview: support for Xamarin
• Machine generated for testing purposes 
• Contains special characters and provides longer strings 
• Some value [7B769][!!_Śóмé νàļúé_!!] 
• Windows 8 / 8.1 
• Add qps-ploc to your language preferences and place it on top of the list 
• Windows Phone 8.1 RT 
• Only available in code, not a selectable system language 
ApplicationLanguages.PrimaryLanguageOverride = "qps-ploc"; 
Note: PrimaryLanguageOverride can also be used in Win8 to change at runtime 
20/10/201 
4 
Pseudo (qps-ploc)
20/10/201 
4 
Demo
• Use resource system for most dependency properties 
• Use resource system for different scaling factors 
• Resource.scale-140.resw 
• Image.scale-140.png 
• Application name & other Appxmanifest properties 
• ms-resource:AppName 
• Offload resources to a separate assembly: specify path as Id 
• new 
ResourceLoader("App1.SomeResources/Resources").GetString("MyString"); 
• <TextBlock x:Uid="/App1.SomeResources/Resources/SomeControl" /> 
20/10/201 
4 
But we can do more !
20/10/201 
4 
Demo
• ‘Visual layer to increase tooling support over linked files’ 
• If: 
• Resources work on Windows 8 / 8.1 
• Resources work on Windows Phone 8.1 RT 
• Universal Apps is ‘just linked files’ 
• Then the resources system works in Universal Apps as well (*) 
• (*) Remarks: 
• MAT only on Windows / Windows Phone project, not on Shared 
• Use export – import to prevent translating twice 
• Want .xliff files on 1 place? Use a PCL instead 
20/10/201 
4 
Next step: Universal Apps
20/10/201 
4 
Demo
20/10/2014
Keep in touch 
Bart Lannoeye 
@bartlannoeye 
20/10/2014 
www.madn.be 
@MADNbe

More Related Content

Similar to Run your app on every Windows Phone 8.1 device in the world

Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
drudolph11
 
haXe - One codebase to rule'em all
haXe - One codebase to rule'em allhaXe - One codebase to rule'em all
haXe - One codebase to rule'em all
Tom Crombez
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
lennartkats
 

Similar to Run your app on every Windows Phone 8.1 device in the world (20)

MVP Virtual Conference - Americas 2015 - Cross platform localization for mobi...
MVP Virtual Conference - Americas 2015 - Cross platform localization for mobi...MVP Virtual Conference - Americas 2015 - Cross platform localization for mobi...
MVP Virtual Conference - Americas 2015 - Cross platform localization for mobi...
 
Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1Windows 8 DevUnleashed - Session 1
Windows 8 DevUnleashed - Session 1
 
haXe - One codebase to rule'em all
haXe - One codebase to rule'em allhaXe - One codebase to rule'em all
haXe - One codebase to rule'em all
 
Next Generation Memory Forensics
Next Generation Memory ForensicsNext Generation Memory Forensics
Next Generation Memory Forensics
 
Swt
SwtSwt
Swt
 
Holy PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood editionHoly PowerShell, BATman! - dogfood edition
Holy PowerShell, BATman! - dogfood edition
 
Phonegap 2.x
Phonegap 2.xPhonegap 2.x
Phonegap 2.x
 
Building apps for WP8 and Win8
Building apps for WP8 and Win8Building apps for WP8 and Win8
Building apps for WP8 and Win8
 
Android development workshop
Android development workshopAndroid development workshop
Android development workshop
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Exploring metaprogramming using Ruby language
Exploring metaprogramming using Ruby languageExploring metaprogramming using Ruby language
Exploring metaprogramming using Ruby language
 
Universal Apps Oct 2014
Universal Apps Oct 2014Universal Apps Oct 2014
Universal Apps Oct 2014
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 
Unit 1
Unit 1Unit 1
Unit 1
 
The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189The Ring programming language version 1.6 book - Part 6 of 189
The Ring programming language version 1.6 book - Part 6 of 189
 
.Net framework
.Net framework.Net framework
.Net framework
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
Create Cross Platform Apps with Portable Class Libraries
Create Cross Platform Apps with Portable Class LibrariesCreate Cross Platform Apps with Portable Class Libraries
Create Cross Platform Apps with Portable Class Libraries
 
Node.js
Node.jsNode.js
Node.js
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Run your app on every Windows Phone 8.1 device in the world

  • 1. Your app on every Windows Phone 8.1 device in the world 20/10/2014
  • 2. Who am I? 20/10/2014 Bart Lannoeye @bartlannoeye • MADN Board Member • Microsoft MEET Member • Full-time Win8 dev
  • 3. • General localization best practices • Resources in WP8 vs WP8.1 RT • Multilingual App Toolkit • But we can do more ! • Universal Apps 20/10/201 4 Agenda
  • 4. • Sentences instead of single words • The {0} could not be synchronized. • Be aware of word order, or 1 vs multiple word parts • Provide enough space • Hint: English + 40% • Tip: test with ‘qps-ploc’ • Multiline, text wrapping, trimming • Watch out with re-use • ‘Text’ can be noun & verb • Use unique identifiers to access resources, as resource can change • Stick to a localization approach • Easiest: keep translations till last • Complexity: self-translated, outsourced, automated, … 20/10/201 4 Localization best practices
  • 5. Windows Phone 8 (SL) Windows Phone 8.1 RT 20/10/201 4 Project setup
  • 7. Windows Phone 8 (SL) Windows Phone 8.1 RT .resx files don’t update ! .xlf files update on rebuild machine generated translations 20/10/201 4 Project setup
  • 9. Windows Phone 8 (SL) • Generated class with classname = resources file • MyClass with public prop to expose the generated class • App.xaml: declare MyClass in Application.Resources • Text="{Binding Path=MyResources.Title, Source={StaticResource LocalizedStrings}}" • Adding a new resources file ‘Inconsistent accessibility’ • Fix: use PublicResXFileCodeGenerato r 20/10/201 4 Resources in XAML (1)
  • 11. Windows Phone 8 (SL) Windows Phone 8.1 RT • Generated class with classname = resources file • MyClass with public prop to expose the generated class • App.xaml: declare MyClass in Application.Resources • Text="{Binding Path=MyResources.Title, Source={StaticResource LocalizedStrings}}" • <TextBlock x:Uid=“MyText” /> • In resource file: MyText.Text SomeText • Blackbox magic done for you 20/10/201 4 Resources in XAML (2)
  • 12. Windows Phone 8 (SL) Windows Phone 8.1 RT • Generated class with classname = resources file • Every resource is a static property • string text = AppResources.SomeText 20/10/201 4 Resources in C#
  • 14. Windows Phone 8 (SL) Windows Phone 8.1 RT • Generated class with classname = resources file • Every resource is a static property • string text = AppResources.SomeText • new ResourceLoader() or ResourceLoader .GetForCurrentView() • string text = _loader.GetString(key); • MyUid.Text -> MyUid/Text • Use id in ctor / GetFCV() to access a given resource file 20/10/201 4 Resources in C#
  • 15. • Download MAT: https://dev.windows.com/en-us/develop/multilingual-app-toolkit • Integrated with Visual Studio • Microsoft Language Portal integration • Localization from actual Microsoft Products (e.g. Office) • Machine Translator integration • Dedicated translator UI • XLIFF files: localization industry standard • Export – import files to send to 3rd party (xliff – csv) • Warning for updates, preventing accidental overwrites • Provides pseudo (qps-ploc) for testing 20/10/201 4 Multilingual App Toolkit MAT v4 Tech Preview: support for Xamarin
  • 16. • Machine generated for testing purposes • Contains special characters and provides longer strings • Some value [7B769][!!_Śóмé νàļúé_!!] • Windows 8 / 8.1 • Add qps-ploc to your language preferences and place it on top of the list • Windows Phone 8.1 RT • Only available in code, not a selectable system language ApplicationLanguages.PrimaryLanguageOverride = "qps-ploc"; Note: PrimaryLanguageOverride can also be used in Win8 to change at runtime 20/10/201 4 Pseudo (qps-ploc)
  • 18. • Use resource system for most dependency properties • Use resource system for different scaling factors • Resource.scale-140.resw • Image.scale-140.png • Application name & other Appxmanifest properties • ms-resource:AppName • Offload resources to a separate assembly: specify path as Id • new ResourceLoader("App1.SomeResources/Resources").GetString("MyString"); • <TextBlock x:Uid="/App1.SomeResources/Resources/SomeControl" /> 20/10/201 4 But we can do more !
  • 20. • ‘Visual layer to increase tooling support over linked files’ • If: • Resources work on Windows 8 / 8.1 • Resources work on Windows Phone 8.1 RT • Universal Apps is ‘just linked files’ • Then the resources system works in Universal Apps as well (*) • (*) Remarks: • MAT only on Windows / Windows Phone project, not on Shared • Use export – import to prevent translating twice • Want .xliff files on 1 place? Use a PCL instead 20/10/201 4 Next step: Universal Apps
  • 23. Keep in touch Bart Lannoeye @bartlannoeye 20/10/2014 www.madn.be @MADNbe

Editor's Notes

  1. ResourceMap (RT): http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.core.resourcemap.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1 Alternative: https://reswcodegen.codeplex.com/ (but I don’t like it)
  2. ResourceMap (RT): http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.core.resourcemap.aspx?cs-save-lang=1&cs-lang=csharp#code-snippet-1 Alternative: https://reswcodegen.codeplex.com/ (but I don’t like it)
  3. Xliff: https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xliff qps-ploc: http://msdn.microsoft.com/en-us/library/windows/apps/jj569303.aspx
  4. qps-ploc: http://msdn.microsoft.com/en-us/library/windows/apps/jj569303.aspx
  5. WP8 app title (hard): http://msdn.microsoft.com/en-us/library/windows/apps/ff967550(v=vs.105).aspx