Closed sfysi closed 10 months ago
@sfysi can you please attach a sample project?
@thudugala - In the process of creating a sample project I discovered that MAUI has its own platform-agnostic localization handling, and while the Android-specific strings.xml
files in Platforms/Android/Resources/values
can't be accessed in the CreateMauiApp
method, the Resources/Localization/AppStrings.resx
files can, so that can be used for handling the button translations. Looks like no changes are needed after all. Thank you for your time!
Describe the bug The
NotificationAction
class has astring Title
property, but as the application context does not exist yet in theMauiProgram.CreateMauiApp
method, trying to assign this property to something likePlatform.CurrentActivity.Resources.GetString(Resource.String.some_string_key)
will fail, andResource.String.some_string_key
itself is just anint
that can't be assigned to theTitle
property.To Reproduce Steps to reproduce the behavior:
builder.UseLocalNotification
to initialize configuration settings.config.AddCategory
to create a category and give it anActionList
ofNotificationAction
objects.Title
of one of them to useResources.GetString
.Expected behavior The localized string can be used.
Platform (please complete the following information):
Smartphone (please complete the following information):