Skip to content

Commit bc18620

Browse files
Resolved localization issue with trimming changes
1 parent 0052aa9 commit bc18620

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

maui/src/Core/Localization/LocalizationResourceAccessor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ internal static CultureInfo Culture
7070
/// Initializes the default localization resource with the specified base name.
7171
/// </summary>
7272
/// <param name="baseName">The base name of the resource to initialize.</param>
73-
public static void InitializeDefaultResource(string baseName)
73+
/// /// <param name="resourceType">The optional type used to determine the assembly where resources are located. Defaults to the calling assembly if not specified.</param>///
74+
public static void InitializeDefaultResource(string baseName, Type? resourceType = null)
7475
{
7576
if (LocalizationResourceAccessor.ResourceManager == null)
7677
{
77-
Assembly assembly = Assembly.GetCallingAssembly();
78+
Assembly assembly = resourceType?.Assembly ?? Assembly.GetCallingAssembly();
7879
LocalizationResourceAccessor.ResourceManager = new System.Resources.ResourceManager(baseName, assembly);
7980
LocalizationResourceAccessor.Culture = new CultureInfo("en-US");
8081
}

maui/src/NumericEntry/SfNumericEntry.Methods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ void TextBoxOnLostFocus(object? sender, FocusEventArgs e)
11281128
void Initialize()
11291129
{
11301130
// Initialize resources for the numeric entry control.
1131-
SfNumericEntryResources.InitializeDefaultResource("Syncfusion.Maui.Toolkit.NumericEntry.Resources.SfNumericEntry");
1131+
SfNumericEntryResources.InitializeDefaultResource("Syncfusion.Maui.Toolkit.NumericEntry.Resources.SfNumericEntry", typeof(SfNumericEntry));
11321132

11331133
// Set the drawing order to ensure key elements are drawn correctly
11341134
DrawingOrder = DrawingOrder.AboveContent;

0 commit comments

Comments
 (0)