0

I have a String Catalog file in the iOS app. If I have e.g. a Text("Hello App") in a view in the app, everything is automatically recognized and the key "Hello App" is added to the catalogue.

But if I have a view in a swift package, e.g. Text("Hello SPM"), the key is not added to the string catalog in the app. But I can add the key "Hello SPM" manually, and the translation works, but I would like to have the key added automatically.

I know I could add another String Catalog to the package, but I would like to have only one in the app.

The package has the defaultLocalization: "en" added, I've tried to set the bundle Text("Hello SPM", bundle: .main) (which should be default), I've used combinations like Text(String(localized: "Hello SPM", bundle: .main)), and so on.

Does anyone know a solution?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.