Template variables
Preserve values such as {{.Name}} and {{.Count}} exactly and case-sensitively.
Keep message files in your Go repository and template variables intact. Forthwith translates only new and changed messages, validates locale structure, and writes updates ready for Git review.
$ forthwith check
[ERROR] Placeholder mismatch · WelcomePerson
locales/active.es.toml:22 missing {{.Name}}
Install path
Install the CLI and run it from the Go module root. Forthwith checks supported go-i18n message files locally without becoming an application dependency or requiring project configuration.
Use Homebrew on macOS, the install script on Linux, or Scoop on Windows.
Keep the check beside your source code and existing localization resources.
Review actionable findings locally before creating an account or changing a file.
brew install Forthwith-LLC/forthwith/forthwith
cd path/to/your-project
forthwith check
Framework-aware validation
Check translated text and message structure together so a fluent sentence cannot silently drop the data your template expects.
Preserve values such as {{.Name}} and {{.Count}} exactly and case-sensitively.
Verify the message forms required for each configured target language.
Find absent message IDs and target values that were left empty.
Report malformed resources, duplicate IDs, and inconsistent structured values.
Sample diff
Forthwith updates the message files your bundle already loads. Template data remains visible in the diff, and reviewers can assess the translation in its native structure.
--- a/locales/active.es.toml+++ b/locales/active.es.toml@@ -18,2 +18,5 @@ [CheckoutTitle] other = "Finalizar compra"+[WelcomePerson]+other = "Hola, {{.Name}}"
CI recipe
Add a read-only localization job beside go test so missing messages, plural gaps, and template-variable drift receive a focused failure.
Validation needs no Forthwith token. Exit code 1 fails the job when errors are found; --warnings-as-errors also treats warnings as release blockers.
name: go-i18n localization
on: pull_request
jobs:
localization:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Forthwith
run: curl -fsSL https://raw.githubusercontent.com/Forthwith-LLC/forthwith-releases/main/install.sh | bash
- name: Validate localization files
run: forthwith check --warnings-as-errors
When you are ready to translate
Run your normal message extraction or merge step, initialize Forthwith, and translate only new, changed, and missing messages. The resulting files remain ready for your existing go-i18n bundle.
We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect