All supported frameworks
Go go-i18n workflow

Translate and validate go-i18n message files

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.

locales/active.en.toml

$ forthwith check

[ERROR] Placeholder mismatch · WelcomePerson

locales/active.es.toml:22 missing {{.Name}}

Local scan · no account · no upload
Existing go-i18n message files
Go template variables preserved
Target-aware plural validation

Install path

Check the repository you already have

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.

  1. 1

    Install the Forthwith CLI

    Use Homebrew on macOS, the install script on Linux, or Scoop on Windows.

  2. 2

    Open the repository root

    Keep the check beside your source code and existing localization resources.

  3. 3

    Run forthwith check

    Review actionable findings locally before creating an account or changing a file.

macOS quick start

No configuration required
brew install Forthwith-LLC/forthwith/forthwith
cd path/to/your-project
forthwith check
Linux and Windows install options The first check never changes files.

Framework-aware validation

Keep message files safe for Go templates

Check translated text and message structure together so a fluent sentence cannot silently drop the data your template expects.

Template variables

Preserve values such as {{.Name}} and {{.Count}} exactly and case-sensitively.

Plural forms

Verify the message forms required for each configured target language.

Missing messages

Find absent message IDs and target values that were left empty.

Message structure

Report malformed resources, duplicate IDs, and inconsistent structured values.

Sample diff

Review localization like any other code change

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.

  • Native files stay in their expected location.
  • Placeholders remain visible to reviewers.
  • Only new, changed, or repaired entries appear in the diff.
locales/active.es.toml Generated change
--- a/locales/active.es.toml+++ b/locales/active.es.toml@@ -18,2 +18,5 @@ [CheckoutTitle] other = "Finalizar compra"+[WelcomePerson]+other = "Hola, {{.Name}}"

CI recipe

Check go-i18n messages with the rest of the module

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.

.github/workflows/localization.yml GitHub Actions
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

Move from a local report to a reviewable locale update

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.