I tried to generate to Localize file in SwiftGen, but I spent an hour wondering how to specify multiple lproj files inSwiftGen.
But in the end, I just specified a single file as described in the documentation, and it worked fine for other languages.
swiftgen.yml
input_dir: ${PROJECT_DIR}/${TARGET_NAME}/Resources/
output_dir: ${PROJECT_DIR}/${TARGET_NAME}/Generated/
strings:
inputs:
- en.lproj # There is also ja.lproj in the same directory.
outputs:
- templateName: structured-swift5
output: Strings+Generated.swift
I have specified en.lproj, but if I set the terminal settings to Japanese, the strings defined in ja.lproj will be displayed without any problem.
The config file can be generated by swiftgen config init.