FindMyFiles
FindMyFiles.Services
Loc Class
Localized-string facade over the Windows App SDK ResourceLoader (PRI built from Strings/<lang>/Resources.resw). Code keys are flat identifiers (Area_Thing, e.g. Status_Preparing); XAML strings come from x:Uid instead. The Override seam lets unit tests resolve keys without a PRI in the test host.
public static class Loc
Inheritance System.Object → Loc
Properties
Loc.Override Property
Test seam: when set, resolves keys instead of the ResourceLoader.
public static System.Func<string,string>? Override { get; set; }
Property Value
System.Func<System.String,System.String>
Methods
Loc.Get(string) Method
Resolve a key to the current UI language. A missing key falls back to the key itself so the gap is visible, never an empty UI.
public static string Get(string key);
Parameters
key System.String
Flat resource identifier (e.g. Status_Preparing).
Returns
System.String
The localized string, or the key itself when unresolved.
Loc.Get(string, object[]) Method
Resolve a key whose value is a composite format string (placeholders {0}, {1}, …) and fill it.
public static string Get(string key, params object[] args);
Parameters
key System.String
Flat resource identifier whose value is a format string.
args System.Object[]
Values substituted into the {0}, {1}, … placeholders.
Returns
System.String
The localized string with the arguments formatted in.