Which two modifications should you make to MainPage.xaml?

You are developing a Universal Windows Platform (UWP) app.
In MainPage.xaml, you have the following markup.

You plan to implement localization for the following cultures:
de-DE
fr-CA
en-US
You create a folder within the project named Strings that contains a subfolder for each culture. Each subfolder contains a resource file named Greetings.resw. You
need to ensure that TextBlock appears by using the appropriate localization.
Which two modifications should you make to MainPage.xaml? Each correct answer presents part of the solution.

You are developing a Universal Windows Platform (UWP) app.
In MainPage.xaml, you have the following markup.

You plan to implement localization for the following cultures:
de-DE
fr-CA
en-US
You create a folder within the project named Strings that contains a subfolder for each culture. Each subfolder contains a resource file named Greetings.resw. You
need to ensure that TextBlock appears by using the appropriate localization.
Which two modifications should you make to MainPage.xaml? Each correct answer presents part of the solution.

A.
Replace x:Name with x:Phase.

B.
Change “Greeting” to “Resources/Greeting”.

C.
Change “Greeting” to “Greetings/Greeting”.

D.
Replace x:Name with x:FieldModifier.

E.
Replace x:Name with x:Uid.

F.
Change “Greeting” to “Greetings.resw/Greeting”.

Explanation:
E: The keys of the key-value pairs are x:Uid values that are placed by the developer in the original XAML. These x:Uid values enable the API to track and merge
changes that happen between the developer and the localizer during localization.

http://stackoverflow.com/questions/14929590/resource-localization-use-of-xuid-refering-to-another-assemblys-resource



Leave a Reply 1

Your email address will not be published. Required fields are marked *


Herbert

Herbert

Answer B. is not correct. The correct value for x:Uid is “/Greetings/Greeting”, because the resource file is named “Greetings.resw”. In order for this to work, the resource files need to contain the key “Greeting.Text”.
See also: https://msdn.microsoft.com/en-US/library/windows/apps/xaml/hh965323

Answer C. is incorrect, too, because the preceding “/” is important.