arm1.ru

Tag: «localization»

Adding translations to an app or a package with AI help

event Jan 14, 2025 at 10:44

Translated String Catalog

In the previous article, I've explained how to add a Strings Catalog to a Swift package to support localizations. Now, we'll try to translate it into more languages.

Localizing a Swift Package with a String Catalog

event Jan 14, 2025 at 09:13

Recently, I've been working on a Swift Package with some strings that I wanted to localize. Apple's documentation on this topic seems to be a bit outdated. The documentation still suggests using language-specific directories for localizing resources and strings.

But, at WWDC 2023, Apple introduced String Catalogs. It's much more handy - just a JSON file that Xcode can fill with all the strings that need to be localized. Most of the examples you can find are about apps, not packages. So, I've spent some time trying to figure out how to use String Catalogs in a Swift package.