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

  • SEARCH
  • Home
  • 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 8440123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:11:59+00:00 2026-06-10T08:11:59+00:00

I have a C# app that needs to be localized. I can use the

  • 0

I have a C# app that needs to be localized. I can use the RESX .NET MUI strategy to do that. Now, I have a separate team that is providing additional localized resources (XML files) post build/compile time. I’d like to take advantage of .NETs MUI strategy which provides a nice fallback mechanism, but I can’t seem to find a way to make that happen.

Note, I have thought about adding the localized file names (which I know) in my App’s string resources file. However, if at runtime the file doesn’t exist, then I’ll have problems (and no way to automatically fallback).

So, is there a way to utilize the .NET MUI strategy in this scenario?

  • 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-06-10T08:12:00+00:00Added an answer on June 10, 2026 at 8:12 am

    Option 1:

    You can store the XML files in a resource, and then get a stream object to read it, which uses the same approach as is done with strings, etc. See http://msdn.microsoft.com/en-us/library/zxee5096.aspx for that.

    Option 2:

    You can also apply the same basic approach as that used by resources yourself. I’ve found it convenient with web applications which are often based on a lot of files (.aspx, .html, .css, .js, .png, etc) anyway. Say you’ve got a bunch of directories like:

    localised/en/SomeFile1.xml (and etc….)
    localised/en-US/SomeFile1.xml (and etc….)
    localised/en-GB/SomeFile.xml
    localised/fr/SomeFile.xml

    I come along with my en-IE prefernces, and you don’t match that, but you do match en and that’s good enough (okay ideally you should pick up that en-IE is closer to en-GB than en-US, but that’s totally into the bonus-credit territory and much better than .NET will do with resources).

    Your matching algorithm should be:

    1. Try to find a match for the locale sought, return if found.
    2. Drop off the end of the locale, so en-GB-OED becomes en-GB, en-GB becomes en- and so on. If that doesn’t remove the whole thing, go back to step 1 with this new locale.
    3. Try zxx (zxx isn’t used by .NET afaik, but it is used with BCP 47/RFC 4647 and ISO 639 for items with no lingual content – e.g. a passport photo of you is locale zxx because it’s just as appropriate to go with a French document as a Yoruba or Welsh one).
    4. Try a “default” locale as defined by you (or error if your application promises to make a good match).

    At that point, you’ll be doing slightly better than what resource files do. Still, mostly option 1 is a lot simpler and is far more self-contained.

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

Sidebar

Related Questions

I have an app that needs to open an XPS file. I can use
We have an app that needs to access network resources. It's written in VB.Net.
I have an app that needs to be able use either an sqlite3 datebase
We have a .NET app that needs to examine a folder that may contain
I have an app that needs to read a PDF file from the file
I have an app that needs backgrounds for both parts of the split view.
I have a Rails app that needs to expose values from a database as
I have a wpf app that needs to communicate(exchange data) with a custom designed
I have an app that has a bunch of Core Data that it needs
I have a MySQL/Rails app that needs search. Here's some info about the data:

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.