How to localize App Intents using LocalizedStringResource

• written by Perjan Duro

As I went on a redesigned the entire App Shortcuts in MoneyCoach, I realized that I need to localize the App Intents. I mean, it’s a no brainer, but I didn’t think about it until I had to do it.

App Intents use a new more intelligent way of handling localizations. You need to use the LocalizedStringResource. The documentation is a bit lacking, but I managed to figure it out after wasting/investing/spending 2 days of trial and error. Looking forward to save you time with this simple tutorial.

How to localize App Intents

  1. First you need to use LocalizedStringResource.
  2. Second you have Xcode generate the strings file for you. Just go over to Product --> Export Localizations and select the language you want to localize. Xcode will generate the strings file for you. Except that it doesn't.

Solution

So the trick is to go over to your project build settings or target build settings, find the "Use Compiler To Extract Swift Strings" and set it to Yes.

That's it. Go ahead and repeat step 2.

So this is now easy it is to have Xcode generate the strings for LocalizedStringResource. Now let's see how to use it.

Articles you might like

• written by Perjan Duro

MoneyCoach Diaries: 1 - 15 June 2023

In the first two weeks of June, we added some interesting features to MoneyCoach. We also started working on a new version of the app that is gonna be released in the fall. We are also working on a new app for the Apple Vision Pro.

• written by Perjan Duro

What's New In MoneyCoach 8.4.7?

Thanks for using MoneyCoach and for all the recent lovely reviews. Here’s what’s new in this update: ### Bulk Edit Description, Payees & Tags You can now select multiple transactions in the list and bulk edit the description, payee and