1

We are currently using ASP.NET ZERO (ABP). Throughout the course of implementation the XML files with LocalizedTexts got bigger and bigger.

To manage LocalizedTexts we are using a build-in manager:

Manager

We use XML (file.xml) file with culture "en" and the LocalizedTexts are being added there. There are also other XML files with other cultures like "de" (file-de.xml) where some keys are added but some don't.

Problem occures when the site's language is set to "de", then the manager fetches all keys from "de" file (file-de.xml) and ultimately there is no way to apply translations to those LocalizedTexts which keys are in "en" (file.xml) but not in "de" (file-de.xml).

Is there a neat way to access all keys in the manager without adding them to multiple files simultanously?

I know we can fetch both and do a union:

var allDefaultStrings = source.GetAllStrings(CultureInfo.GetCultureInfo("en"));
var allStrings = source.GetAllStrings();
var union = allStrings.Union(allDefaultStrings, new LocalizedStringComparer());
funie200
  • 2,683
  • 4
  • 16
  • 27
CabbageMan
  • 11
  • 2

0 Answers0