-
Notifications
You must be signed in to change notification settings - Fork 146
/
Copy pathSyncfusionLocalizer.cs
37 lines (35 loc) · 1.23 KB
/
SyncfusionLocalizer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#region Copyright Syncfusion® Inc. 2001-2025.
// Copyright Syncfusion® Inc. 2001-2025. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using Syncfusion.Blazor;
namespace Blazor_MAUI_Demos.Shared
{
/// <summary>
/// Extends ISyncfusionStringLocalizer for applying localization to Syncfusion components.
/// </summary>
public class SyncfusionLocalizer : ISyncfusionStringLocalizer
{
/// <summary>
/// Get locale value from the resource file.
/// </summary>
/// <param name="key">Locale key for getting the translated text.</param>
public string GetText(string key)
{
return this.ResourceManager.GetString(key);
}
/// <summary>
/// Access the resource file and get the exact value from the locale key.
/// </summary>
public System.Resources.ResourceManager ResourceManager
{
get
{
return Blazor_MAUI_Demos.Resources.SfResources.ResourceManager;
}
}
}
}