SlideShare a Scribd company logo
1 of 27
BUILDING WINDOWS PHONE
APPLICATION
1. Handling Screen Orientation Changes
2. Supporting Multiple Screen Resolutions
3. Introduction to Localization
FOLLOW US
Twitter

: @chothanihitesh

Slideshare

: http://www.slideshare.net/Chothani-Hitesh

Email

: chothani.hitesh@gmail.com

Support

: windows.chothani@live.com

LinkedIn

: in.linkedin.com/pub/hiteshchothani/6b/311/2b8

W8 Publisher

: AppStudios

WP Publisher : AppStudios
Website

: www.appmobinfotech.com
HANDLING SCREEN
ORIENTATION CHANGES
PHONE UI DESIGN – ORIENTATION


This application does not work
in landscape mode at the
moment



Not all applications do, or need
to



You can configure applications
to support portrait or landscape
NEW DEVICE TAB IN VISUAL STUDIO 2012


View Designer in Portrait or Landscape
SELECTING ORIENTATIONS



A XAML property for the phone application page lets you select the

orientation options available


Your application can bind to an event which is fired when the
orientation changes
LAYOUT MAY NEED ALTERING
USING A GRID TO AID LANDSCAPE
LAYOUT
MOVE ELEMENTS IN LANDSCAPE LAYOUT



In Landscape, the recipe description moves into the second row and the
second column and the third row of the grid is now unused. Since that row’s
Height is “*”, it shrinks to zero.
MOVING ELEMENTS
SUPPORTING MULTIPLE SCREEN
RESOLUTIONS
THREE SCREEN RESOLUTIONS
SO I HAVE TO DO THREE DIFFERENT UIS?


Well, No…



As developers, we work with device independent pixels


OS applies a scale factor to the actual resolution
SCALED RESOLUTIONS
USE “AUTO” AND “*” ON GRID ROWS TO
ENSURE GOOD LAYOUT


Set Grid Row Height to “Auto” to
size according to the controls placed

within it


Set Grid Row Height to “*” to take
up all the rest of the space



If you size multiple rows using “*”,
available space is divided up evenly
between them
ADAPTIVE LAYOUT USING GRID
IMAGES


•In most cases, you should supply images targeting the WXGA (1280 x
768) screen



Will automatically scale down on WVGA phones





WXGA assets are of the highest quality

Still look great on 720p (1280 x 720)

If you want, you can include images at each of the three resolutions in
your project


E.g. MyImage.wvga.png, MyImage.wxga.png and MyImage.720p.png



At runtime, get Application.Current.Host.Content.ScaleFactor to determine

the resolution of the screen on the current phone, returns 100 for WVGA, 160 for
WXGA and 150 for 720p


Write code to load image at runtime appropriate for the current screen resolution
SPLASH SCREENS


To add a splash screen to your project suitable for all resolutions, add a
file as content called SplashScreenImage.jpg at 768 x 1280 resolution


The framework automatically scales it to the correct size on different resolution
screens



If you want to provide pixel-perfect splash screens for all resolutions,

add images with the following names:



SplashScreenImage.Screen-WXGA.jpg





SplashScreenImage.Screen-WVGA.jpg

SplashScreenImage.Screen-720p.jpg

In addition to these images, you must still include the default
SplashScreenImage.jpg file
APP ICON AND TILES


You must supply app icon and tile images sized for WXGA



The framework automatically scales to the correct size for WVGA and
720p
INTRODUCTION TO
LOCALIZATION
WINDOWS PHONE 8 LANGUAGE SUPPORT


Windows Phone 8 supports 50 display
languages (shipped with the phone
depending on market and country/region)
and selectable by the user on the
language+region section of the Settings

page




Windows Phone 7.1 supported only 24

Windows Phone 8 allows you to build apps
that read from right to left
NEW PROJECT TEMPLATES HAVE
LOCALIZATION SUPPORT BUILT IN


Every new project you create in Visual Studio
2012 has a class included called LocalizedStrings


Simply provides programmatic access to resources



An instance of this is create in App.xaml in the
Application Resources with the key LocalizedStrings



Every new project also includes a resources file:

ResourcesAppResources.resx


Some strings already defined in here



Create all your string literals in here to support
localization



All new projects also included commented-out

code in MainPage.xaml.cs to setup a localized
Application Bar
ACCESSING STRING RESOURCES FROM
XAML


Databind the Text property
of your TextBlock and other
controls to the
StaticResource with a key
of LocalizedStrings



That is an instance of the
LocalizedStrings class



It provides access to string
resources
ADD SUPPORT FOR ADDITIONAL
LANGUAGES


Double-click project properties to
open the Properties editor



On the Application tab


Check each of the languages your app
will support



Save the Project Properties


Visual Studio creates new AppResources
files for each selected language/culture
TRANSLATE THE ADDITIONAL LANGUAGES
RESOURCE FILES


Visual Studio adds a resource file for each additional language that the
app will support. Each resource file is named using the correct
culture/language name, as described in Culture and language support
for Windows Phone in the documentation



For example:





For the culture Spanish (Spain), file is AppResources.es-ES.resx.
For the culture German (Germany), file is AppResources.de-DE.resx.

Supply appropriate translations in each resource file
DEFINE THE DEFAULT LANGUAGE


Double-click WMAppManifest.xml to
open the manifest editor



On the Packaging tab



Set the Default Language to the
language of your default resources


This identifies the language of the strings
in the default resources file. E.g., if the
strings in the default resources file are
English (UK) language strings, you
would select English (United Kingdom)
as the Neutral Language for the project
Thank You

More Related Content

Similar to Build Windows Phone Apps and Support Multiple Screens and Languages

Btb017 David
Btb017 DavidBtb017 David
Btb017 DavidRohit Ray
 
Android App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple DevicesAndroid App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple DevicesAnuchit Chalothorn
 
Make your PWA feel more like an app
Make your PWA feel more like an appMake your PWA feel more like an app
Make your PWA feel more like an appÖnder Ceylan
 
Web application development process
Web application development processWeb application development process
Web application development processJohn Smith
 
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3hitesh chothani
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overviewcodeblock
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publicationWindowsPhoneRocks
 
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project TemplateYasmine Abdelhady
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Developmentjames smith
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Decksschwarzhoff
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGapJoseph Labrecque
 
Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2hitesh chothani
 
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentTowhidul Haque Roni
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screenspaultrani
 
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsCastle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsLucas Jellema
 

Similar to Build Windows Phone Apps and Support Multiple Screens and Languages (20)

Btb017 David
Btb017 DavidBtb017 David
Btb017 David
 
Android App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple DevicesAndroid App Development 08 : Support Multiple Devices
Android App Development 08 : Support Multiple Devices
 
Make your PWA feel more like an app
Make your PWA feel more like an appMake your PWA feel more like an app
Make your PWA feel more like an app
 
Web application development process
Web application development processWeb application development process
Web application development process
 
Windows phone 8 session 3
Windows phone 8 session 3Windows phone 8 session 3
Windows phone 8 session 3
 
pebble - Building apps on pebble
pebble - Building apps on pebblepebble - Building apps on pebble
pebble - Building apps on pebble
 
Windows phone 8 overview
Windows phone 8 overviewWindows phone 8 overview
Windows phone 8 overview
 
21 app packaging, monetization and publication
21   app packaging, monetization and publication21   app packaging, monetization and publication
21 app packaging, monetization and publication
 
"Discover windows phone" 01. Project Template
"Discover windows phone"  01. Project Template"Discover windows phone"  01. Project Template
"Discover windows phone" 01. Project Template
 
Google Assistant Revolution
Google Assistant RevolutionGoogle Assistant Revolution
Google Assistant Revolution
 
Mobile App Development
Mobile App DevelopmentMobile App Development
Mobile App Development
 
Silverlight Training
Silverlight TrainingSilverlight Training
Silverlight Training
 
Titanium Meetup Deck
Titanium Meetup DeckTitanium Meetup Deck
Titanium Meetup Deck
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Chpater1
Chpater1Chpater1
Chpater1
 
Windows phone 8 session 2
Windows phone 8 session 2Windows phone 8 session 2
Windows phone 8 session 2
 
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N Development
 
Creating Flash Content for Multiple Screens
Creating Flash Content for Multiple ScreensCreating Flash Content for Multiple Screens
Creating Flash Content for Multiple Screens
 
Progressive Web Apps - deep dive
Progressive Web Apps - deep diveProgressive Web Apps - deep dive
Progressive Web Apps - deep dive
 
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces ApplicationsCastle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
Castle in the Clouds: SaaS-Enabling Oracle ADF Faces Applications
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 

Build Windows Phone Apps and Support Multiple Screens and Languages

  • 1. BUILDING WINDOWS PHONE APPLICATION 1. Handling Screen Orientation Changes 2. Supporting Multiple Screen Resolutions 3. Introduction to Localization
  • 2. FOLLOW US Twitter : @chothanihitesh Slideshare : http://www.slideshare.net/Chothani-Hitesh Email : chothani.hitesh@gmail.com Support : windows.chothani@live.com LinkedIn : in.linkedin.com/pub/hiteshchothani/6b/311/2b8 W8 Publisher : AppStudios WP Publisher : AppStudios Website : www.appmobinfotech.com
  • 4. PHONE UI DESIGN – ORIENTATION  This application does not work in landscape mode at the moment  Not all applications do, or need to  You can configure applications to support portrait or landscape
  • 5. NEW DEVICE TAB IN VISUAL STUDIO 2012  View Designer in Portrait or Landscape
  • 6. SELECTING ORIENTATIONS  A XAML property for the phone application page lets you select the orientation options available  Your application can bind to an event which is fired when the orientation changes
  • 7. LAYOUT MAY NEED ALTERING
  • 8. USING A GRID TO AID LANDSCAPE LAYOUT
  • 9. MOVE ELEMENTS IN LANDSCAPE LAYOUT  In Landscape, the recipe description moves into the second row and the second column and the third row of the grid is now unused. Since that row’s Height is “*”, it shrinks to zero.
  • 13. SO I HAVE TO DO THREE DIFFERENT UIS?  Well, No…  As developers, we work with device independent pixels  OS applies a scale factor to the actual resolution
  • 15. USE “AUTO” AND “*” ON GRID ROWS TO ENSURE GOOD LAYOUT  Set Grid Row Height to “Auto” to size according to the controls placed within it  Set Grid Row Height to “*” to take up all the rest of the space  If you size multiple rows using “*”, available space is divided up evenly between them
  • 17. IMAGES  •In most cases, you should supply images targeting the WXGA (1280 x 768) screen   Will automatically scale down on WVGA phones   WXGA assets are of the highest quality Still look great on 720p (1280 x 720) If you want, you can include images at each of the three resolutions in your project  E.g. MyImage.wvga.png, MyImage.wxga.png and MyImage.720p.png  At runtime, get Application.Current.Host.Content.ScaleFactor to determine the resolution of the screen on the current phone, returns 100 for WVGA, 160 for WXGA and 150 for 720p  Write code to load image at runtime appropriate for the current screen resolution
  • 18. SPLASH SCREENS  To add a splash screen to your project suitable for all resolutions, add a file as content called SplashScreenImage.jpg at 768 x 1280 resolution  The framework automatically scales it to the correct size on different resolution screens  If you want to provide pixel-perfect splash screens for all resolutions, add images with the following names:   SplashScreenImage.Screen-WXGA.jpg   SplashScreenImage.Screen-WVGA.jpg SplashScreenImage.Screen-720p.jpg In addition to these images, you must still include the default SplashScreenImage.jpg file
  • 19. APP ICON AND TILES  You must supply app icon and tile images sized for WXGA  The framework automatically scales to the correct size for WVGA and 720p
  • 21. WINDOWS PHONE 8 LANGUAGE SUPPORT  Windows Phone 8 supports 50 display languages (shipped with the phone depending on market and country/region) and selectable by the user on the language+region section of the Settings page   Windows Phone 7.1 supported only 24 Windows Phone 8 allows you to build apps that read from right to left
  • 22. NEW PROJECT TEMPLATES HAVE LOCALIZATION SUPPORT BUILT IN  Every new project you create in Visual Studio 2012 has a class included called LocalizedStrings  Simply provides programmatic access to resources  An instance of this is create in App.xaml in the Application Resources with the key LocalizedStrings  Every new project also includes a resources file: ResourcesAppResources.resx  Some strings already defined in here  Create all your string literals in here to support localization  All new projects also included commented-out code in MainPage.xaml.cs to setup a localized Application Bar
  • 23. ACCESSING STRING RESOURCES FROM XAML  Databind the Text property of your TextBlock and other controls to the StaticResource with a key of LocalizedStrings  That is an instance of the LocalizedStrings class  It provides access to string resources
  • 24. ADD SUPPORT FOR ADDITIONAL LANGUAGES  Double-click project properties to open the Properties editor  On the Application tab  Check each of the languages your app will support  Save the Project Properties  Visual Studio creates new AppResources files for each selected language/culture
  • 25. TRANSLATE THE ADDITIONAL LANGUAGES RESOURCE FILES  Visual Studio adds a resource file for each additional language that the app will support. Each resource file is named using the correct culture/language name, as described in Culture and language support for Windows Phone in the documentation  For example:    For the culture Spanish (Spain), file is AppResources.es-ES.resx. For the culture German (Germany), file is AppResources.de-DE.resx. Supply appropriate translations in each resource file
  • 26. DEFINE THE DEFAULT LANGUAGE  Double-click WMAppManifest.xml to open the manifest editor  On the Packaging tab  Set the Default Language to the language of your default resources  This identifies the language of the strings in the default resources file. E.g., if the strings in the default resources file are English (UK) language strings, you would select English (United Kingdom) as the Neutral Language for the project