11 private readonly
bool useDefaultLanguageIfFound;
16 this.useDefaultLanguageIfFound = useDefaultLanguageIfFound;
17 if (primary is
FallbackLString { primary: { } innerPrimary, fallback: { } innerFallback })
19 this.primary = innerPrimary;
20 this.fallback = innerFallback.
Fallback(fallback);
24 this.primary = primary;
25 this.fallback = fallback;
31 return base.MustRetrieveValue()
37 public override bool Loaded => primary.Loaded || fallback.Loaded;
43 bool defaultLanguageFallbackAvailable = primary is
TagLString { UsingDefaultLanguageAsFallback:
true };
45 if (!primary.Loaded &&
46 (!defaultLanguageFallbackAvailable || !useDefaultLanguageIfFound))
56 return innerFallback.GetLastFallback();
override void RetrieveValue()
FallbackLString(LocalizedString primary, LocalizedString fallback, bool useDefaultLanguageIfFound=true)
If the text is available in the default language (English), should it be used instead of this fallbac...
LocalizedString GetLastFallback()
override bool MustRetrieveValue()
LocalizedString Fallback(LocalizedString fallback, bool useDefaultLanguageIfFound=true)
Use this text instead if the original text cannot be found.