Skip to content
LOOMLOCALE

Configuration

Loomlocale is configured by the cloud block in tongue.config.ts; tongue link writes it for you.

// tongue.config.ts
import { defineConfig } from "next-tongue/config";

export default defineConfig({ locales: ["en", "de", "fr", "ja"], defaultLocale: "en", messages: "./messages/{locale}.json", translate: { glossary: "./tongue.glossary.json", lockfile: "./tongue.lock", context: "A developer tool for translating web apps.", }, cloud: { projectId: "prj_8f2c", files: "messages/en/**/*.json", layout: "per-locale-folder", formality: "less", maxCostGBP: 10, }, }); ```

cloud options

OptionTypeDefaultDescription
`projectId``string`—Project linked by `tongue link`
`apiUrl``string``https://api.loomlocale.com`API base URL
`tokenEnv``string``LOOMLOCALE_TOKEN`Environment variable holding a token
`files``string \string[]`detectedGlob(s) of source key files
`layout``"per-locale-file" \"per-locale-folder" \"single"`detectedHow locale files are written
`formality``"more" \"less"`—Preferred formality where supported
`maxCostGBP``number`—Refuse any run estimated above this

Removed in 1.0

translate.baseURL, translate.model, translate.apiKeyEnv and translate.maxTokens are removed: the hosted API is the only translation path. tongue check reports them with a migration hint. Pin next-tongue@0.9 if you must keep your own OpenAI key.

Glossary

tongue.glossary.json holds { "terms": [...] }. It is uploaded on tongue push and merged with the dashboard glossary; after the first sync the server copy is authoritative. A glossary change marks affected keys stale.

Lockfile

tongue.lock stores a sha256 hash per locale and key. Version 2 adds { version: 2, projectId, serverRevision }; 0.9 lockfiles upgrade in place without retranslating.

Message metadata

Add $description and $meta (description, screenshot, maxLength) beside a key to give translators context. Output over maxLength goes to review instead of your files.

Environment variables

VariablePurpose
`LOOMLOCALE_TOKEN`Project (`llt_`) or personal token; overrides the keychain
`CI`When `true`, review mode is the default