Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3231276
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:01:35+00:00 2026-05-17T17:01:35+00:00

I’m having a little trouble getting localized resources files to work on Windows Phone

  • 0

I’m having a little trouble getting localized resources files to work on Windows Phone 7. Here’s what I’m doing:

  1. Create a resource file, say “Strings.resx” (Build Action: Compile)
  2. Create a key, say “TestKey” with a default value of empty string
  3. Add a English resource file in the same folder with a value of “some English string”: Strings.en-us.resx (Build Action: Embedded Resource)
  4. Add a Japanese resource file in the same folder with a value of “some Japanese string”: Strings.ja-jp.resx (Build Action: Embedded Resource)

In my PC Silverlight, WPF Apps that works fine when I change the Thread.CurrentThread.CurrentCulture. But in the phone I always seem to be getting the value that’s in the Strings.resx file – an empty string.

I have tried using the designer generated code and wiring up the resource manager by hand and it does not seem to matter. Here’s my code:

            Type t = typeof(Strings);

            _resourceManager = new ResourceManager(
                t.Namespace + "." + t.Name,
                t.Assembly);

            _resourceManager.GetString("TestKey");

Tell me localized resources are supported on the phone… ;> What am I doing wrong? Thanks!

Update: Thanks Olivier for forwarding the link. I saw that as well but missed an important step. I didn’t add the “SupportedCultures” node to my csproj. Made all the difference – hoping someone else doesn’t loose two hours trying to figure this out like I did.

<SupportedCultures>de-DE;es-ES;</SupportedCultures>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:01:35+00:00Added an answer on May 17, 2026 at 5:01 pm

    I wrote a blog post that provides links to a bunch of Globalization / Localization guides for WP7. There is a Windows Phone 7 in 7 Training video that helped me understand the basics. After that it was simply a matter of learning how to do databinding:

    The MSDN article shows you how to
    setup the files and create the
    LocalizedStrings class, but they then
    assume that you know how to use that
    class for data binding. Visual Studio
    2010 and Silverlight handle data
    binding differently than Winforms, and
    it gets even more confusing since XAML
    also has it’s own definition of
    Resources that are different then the
    .NET resources we just created.
    Silverlight also uses the term
    Resource to refer to files that use
    the the Build Action of “Content”, as
    these files get wrapped up into the
    .XAP file similar to how files with
    Build Action of “Resource” get
    embedded into the .Dll assembly (ex:
    loading an image from content or
    resource files). I found that instead
    of using the Text=”{Binding
    Path=resourceFile.resourceName,
    Source={StaticResource
    Localizedresources }}” XAML syntax it
    was easier to use the following steps:

    1. Open your primary XAML page (usually MainPage.xaml) in the Visual
      Studio designer

    2. Open the properties for the PhoneApplicationPage and set the
      DataContext to be
      Application.Resources –>
      LocalizedStrings. NOTE: if you already
      are using a DataContext object, then
      you should integrate the
      LocalizedStrings class into that
      object so that it has localization
      support.

    3. Once the Page’s DataContext has been set you can change the data
      binding for any control on the page by
      simply selecting the property (ex:
      text, checked, etc), selecting “Apply
      Data Binding…”, and setting the Path
      to Localizedresources.BtnText or
      whatever the name of the desired
      resource value is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.