Skip to content

Commit 6b88ac8

Browse files
committed
Replaced the usage of IStringLocalizer with ResourceLoader, since the IStringLocalizer didn't work for other platforms than WinAppSDK anymore.
1 parent bd45ee5 commit 6b88ac8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
using Windows.ApplicationModel.Resources;
2+
13
namespace CodeBreaker.Uno.Helpers;
24

35
internal static class ResourceExtensions
46
{
5-
private static readonly IStringLocalizer s_stringLocalizer = App.GetService<IStringLocalizer>();
7+
private static readonly ResourceLoader s_resourceLoader = ResourceLoader.GetForViewIndependentUse();
68

7-
public static string GetLocalized(this string resourceKey) => s_stringLocalizer.GetString(resourceKey);
9+
public static string GetLocalized(this string resourceKey) => s_resourceLoader.GetString(resourceKey);
810
}

0 commit comments

Comments
 (0)