JDStatusBarNotification icon indicating copy to clipboard operation
JDStatusBarNotification copied to clipboard

Use LocalizedStringKeys

Open CleverLemming1337 opened this issue 1 year ago • 2 comments

Using them for title and subtitle would support localization for notification content with a string catalog.

CleverLemming1337 avatar Jul 19 '24 07:07 CleverLemming1337

Can you be more explicit here? Can't you pass already localized strings to the framework?

calimarkus avatar Jul 19 '24 11:07 calimarkus

I mean that changing the type of title and subtitle from String to LocalizedStringKey would list all used strings in a string catalog to adapt them to the different languages. As far as I know it's not possible to do that with Strings.

CleverLemming1337 avatar Jul 19 '24 12:07 CleverLemming1337

Sadly that won't work, as the view itself is implemented using UILabel's. So you have to use NSLocalizedString("string-key", comment: "") to pass localized strings to the present() functions. Or use the newer presentSwiftView(styleName:viewBuilder:completion:) to present a custom swift view.

calimarkus avatar Dec 07 '24 19:12 calimarkus