-
Re: deferredLocalizedIntentsString
siburb2 Aug 28, 2019 12:27 AM (in response to vmagalhaes)Have you ever made any progress on this? We've been just using NSLocalizedString because this never worked properly, but would like to start using it now. It seems like it has never been fixed?
When using `deferredLocalizedIntentsString` for the title of an NSUserActivity based shortcut, we just get the key as the title, and not the localized string. It seems to work for the suggested invocation phrase of a user activity based shortcut.
When using `deferredLocalizedIntentsString` for the `suggestedInvocationPhrase` of an `INShortcut`, we just get the key as the suggested invocation phrase.-
Re: deferredLocalizedIntentsString
startover205 Aug 29, 2019 7:04 AM (in response to siburb2)Hi! After some tests, I realized some rules to get it working. Hope these can help you!
For example,
NSString.deferredLocalizedIntentsString(with: "Start Activity")
1.The deferred localization depends on the Siri's language settings, not the system's.
2.The deferred localization looks up the phrase "Start Activity" on main app's "localizable.strings" file, not the app extensions' or framework's.
3.The "Start Activity" part won't be included in the xcatalog file generated by Xcode, so you have to use NSLocalizedString("Start Activity") somewhere in the code of main app.
-