简体   繁体   中英

Windows Phone 8 - Localization not working

I was asked to localize a Windows Phone 8 application, so I followed the tutorial that can be found here .

I did a very simple app from the beginning and all the steps stated in the tutorial, and it worked fine. The problem is that in the application I really want to localize, the string resources are not working.

The Resource folder didn't exist, so I created it and then I put inside the .resx files for each language. The files are called "AppResources.resx", and I'm binding them like this:

<TextBlock x:Name="ApplicationTitle" Text="{Binding Path=LocalizedResources.ApplicationTitle, 
Source={StaticResource LocalizedStrings}}" Style="{StaticResource PhoneTextNormalStyle}"/>

Just like in the example (there the .resx are also named "AppResources"). But when I try to deploy the application, the VS 2012 output gives me an error:

The resource "LocalizedStrings" could not be resolved.

I think the problem is that I had to create the Resource folder myself and I'm missing something for the application to be able to recognize it, but I don't know what it is. Can you help me?

Thanks in advance!

You need to define the LocalizedStrings Resource before to use it.

Check the link: http://www.geekchamp.com/articles/localizing-a-windows-phone-app-step-by-step

The instructions here should help.

It says:

  1. Close Visual Studio.
  2. Go to the folder location : "%LOCALAPPDATA%\\Microsoft\\Phone Tools\\CoreCon\\".
  3. Delete the contents of the folders: 10.0 and 11.0.

I am having a different kind of problem, I have developed localization for WP7, I am using Visual Studio 2010 Express, in the WP emulator works fine, but as soon as I publish the application, the localization does not work for WP8 applications

My guess is that there is some other setting that WP8 uses to determine resource file localization, which is always the default language because it does not find that configuration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM