MCPcopy Create free account
hub / github.com/PenguLoader/PenguLoader / SetLanguage

Method SetLanguage

loader/App.xaml.cs:56–66  ·  view source on GitHub ↗
(string lang)

Source from the content-addressed store, hash-verified

54 };
55
56 public static void SetLanguage(string lang)
57 {
58 if (!LanguageMap.ContainsKey(lang))
59 lang = "English";
60
61 var dict = new ResourceDictionary();
62 var file = LanguageMap[lang];
63 dict.Source = new Uri($"Languages/{file}", UriKind.Relative);
64
65 Current.Resources.MergedDictionaries.Add(dict);
66 }
67
68 public static string GetTranslation(string key)
69 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected