This guide assumes that your app is called MyApp and is based on SwiftUI. mooi can still be used with Objective-C and/or UIKit, you would just need to make slight modifications accordingly.
Furthermore, we assume that your project is already set-up to support localization and stores it's localized content in {{languageCode}}.lproj folders (i.e. en.lproj, etc.)
Step 1 - Create a translations file
Create a mooi directory
mkdirmooi
Within that directory, create a translations.yaml file with your strings
# ./mooi/translations.yamllanguages:# English is assumed by default, you don't need to list it-de-fr-ru # etc.entries:-key:myTranslationKeyvalue:Hello Worlddescription:A message that is shown on the main screen of the app # etc.
You are good to go! Use the generated translations as you normally would.
Mixing generated and manual translations
It might very well be that not all translations are managed through mooi. In that case, we would need to output our result to some file other than Localizable.strings
Instead, let's write our output to Generated.strings
Then, we would need to slightly update our code and refer to the translation by specifying a table name: