richardpiazza/translationcatalog
Swift toolkit for managing app localization & internationalization.
Usage
Whether managing string translations as a sole developer on a single project, or as a team across multiple projects, TranslationCatalog has tools for you:
- Lightweight definitions for cataloging multiple languages translations
- Multiple storage options
- Command line utilities.
The TranslationCatalog target includes entity definitions as well as a catalog that can persist and retrieve translations. The primary types are:
Project: A grouping of expressions.Expression: Core type which identifies a collection of translations for a unique key.Translation: The translated value of an expression for a specific Locale.
Storage Options
TranslationCatalog has multiple default storage classes which all implement the Catalog protocol.
| Class | Medium | Notes | | --- | --- | --- | | CoreDataCatalog | CoreData (In-Memory / SQLite) | Great for Apple platforms & when persistence is not needed | | FilesystemCatalog | Directories & JSON Files | Optimized for a team who is using a Git Repository as a store | | SQLiteCatalog | SQLite Database | Lightweight, Fast & Cross-Platform all in a single file |
`localizer`
A swift command line that can interact with a catalog along with importing, exporting, and documenting localizations.
localizer makes it easy to generate Localization files for different platforms. A great workflow option is to use the FilesystemCatalog with a Github repo, and use Github Actions to generate updated localization files when changes are merged.
File types that are currently supported:
- Android
strings.xml - Apple
Localizable.strings - Web (Key/Value)
.json
Helpful Information
Contribution
Contributions to TranslationCatalog are welcomed and encouraged!
Package Metadata
Repository: richardpiazza/translationcatalog
Default branch: main
README: README.md