I have a in-house framework that I share between the main app and the widget.
The framework contains some localized strings.
These strings show up in correct language in the main app but on the widget they only show up in English.
I'm guessing the localized strings from the framework are not getting bundled in the widget extension.
Anybody with the same problem?
The framework contains some localized strings.
These strings show up in correct language in the main app but on the widget they only show up in English.
I'm guessing the localized strings from the framework are not getting bundled in the widget extension.
Anybody with the same problem?
Answering my own question hoping it will help somebody else in the future:
Make sure you specify the bundle argument in NSLocalizedString. Otherwise it will default to Bundle.main. You need to use the bundle of your shared framework for the correct strings to be used.
Make sure you specify the bundle argument in NSLocalizedString. Otherwise it will default to Bundle.main. You need to use the bundle of your shared framework for the correct strings to be used.