Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage Lokalise secondary workflow: Download translations and integrate with app. Use when downloading translation files, exporting translations, or integrating Lokalise output into your application. Trigger with phrases like "lokalise download", "lokalise pull translations", "export lokalise", "get translations from lokalise".
.claude/skills/jeremylongshore-lokalise-core-workflow-b/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 109% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 98% | 0% |
Everything on the "Lokalise to app" side: download translated files, manage translations and review status, leverage translation memory, manage contributors and their language access, and handle format differences across JSON, XLIFF, and PO files.
LOKALISE_API_TOKENLOKALISE_PROJECT_ID@lokalise/node-api installed for SDK exampleslokalise2 CLI installed for CLI examplesunzip available for extracting download bundlesSDK — Download and extract:
typescriptimport { LokaliseApi } from "@lokalise/node-api"; import { execSync } from "node:child_process"; import { mkdirSync } from "node:fs"; const client = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! }); const PROJECT_ID = process.env.LOKALISE_PROJECT_ID!; // Request the download bundle const download = await client.files().download(PROJECT_ID, { format: "json", original_filenames: false, bundle_structure: "%LANG_ISO%.json", // Output: en.json, fr.json, de.json filter_langs: ["en", "fr", "de", "es"], // Only these languages export_empty_as: "base", // Use base language for empty translations include_tags: ["release-3.0"], // Only keys with this tag replace_breaks: false, }); const bundleUrl = download.bundle_url; console.log(`Bundle URL: ${bundleUrl}`); // Download and extract mkdirSync("./locales", { recursive: true }); execSync(`curl -sL "${bundleUrl}" -o /tmp/lokalise-bundle.zip`); execSync(`unzip -o /tmp/lokalise-bundle.zip -d ./locales`); console.log("Translations extracted to ./locales/");
CLI — Download with structure:
bashset -euo pipefail lokalise2 --token "$LOKALISE_API_TOKEN" file download \ --project-id "$LOKALISE_PROJECT_ID" \ --format json \ --original-filenames=false \ --bundle-structure "locales/%LANG_ISO%.json" \ --filter-langs "en,fr,de,es" \ --export-empty-as base \ --replace-breaks=false \ --unzip-to .
SDK — Download with original file structure preserved:
typescriptconst download = await client.files().download(PROJECT_ID, { format: "json", original_filenames: true, directory_prefix: "", // No extra prefix export_empty_as: "skip", // Omit untranslated keys include_comments: false, include_description: false, });
SDK — List translations for a language:
typescriptconst frTranslations = await client.translations().list({ project_id: PROJECT_ID, filter_lang_id: 673, // Language ID for French (find via languages endpoint) filter_is_reviewed: 0, // Only unreviewed limit: 100, }); for (const t of frTranslations.items) { console.log(`[${t.key_id}] ${t.translation} (reviewed: ${t.is_reviewed})`); }
SDK — Update a translation:
typescriptconst updated = await client.translations().update(TRANSLATION_ID, { project_id: PROJECT_ID, translation: "Nouvelle traduction", is_reviewed: false, // Mark as needing review after edit });
SDK — Mark translations as reviewed (batch):
typescriptconst unreviewed = await client.translations().list({ project_id: PROJECT_ID, filter_lang_id: LANG_ID, filter_is_reviewed: 0, limit: 500, }); for (const t of unreviewed.items) { await client.translations().update(t.translation_id, { project_id: PROJECT_ID, is_reviewed: true, }); } console.log(`Marked ${unreviewed.items.length} translations as reviewed`);
SDK — List translations with cursor pagination (for large datasets):
typescriptasync function* paginateTranslations( client: LokaliseApi, projectId: string, langId: number ) { let cursor: string | undefined; do { const params: Record<string, unknown> = { project_id: projectId, filter_lang_id: langId, limit: 500, }; if (cursor) params.cursor = cursor; const page = await client.translations().list(params); yield* page.items; cursor = page.hasNextCursor() ? page.nextCursor() : undefined; } while (cursor); } // Usage for await (const t of paginateTranslations(client, PROJECT_ID, 673)) { console.log(`${t.key_id}: ${t.translation}`); }
SDK — Use TM during upload:
typescriptconst tmResults = await client.translationProviders().list({ team_id: TEAM_ID, }); // TM is automatically applied during file upload when `use_automations: true` const upload = await client.files().upload(PROJECT_ID, { data: base64Data, filename: "en.json", lang_iso: "en", use_automations: true, // Apply TM and MT suggestions automatically slashn_to_linebreak: true, });
SDK — Leverage TM during download (pre-translate empty keys):
typescript// Pre-translate uses TM + MT before download // First, trigger pre-translation // Then download with filled translations const download = await client.files().download(PROJECT_ID, { format: "json", original_filenames: false, bundle_structure: "%LANG_ISO%.json", export_empty_as: "base", // Fallback to base language if TM has no match });
SDK — Add a translator with specific language access:
typescriptconst contributor = await client.contributors().create({ project_id: PROJECT_ID, contributors: [ { email: "translator@example.com", fullname: "Marie Dupont", is_admin: false, is_reviewer: true, languages: [ { lang_iso: "fr", is_writable: true, // Can edit French translations }, { lang_iso: "de", is_writable: false, // Read-only access to German }, ], }, ], }); console.log(`Added contributor: ${contributor.items[0].email}`);
SDK — List all contributors:
typescriptconst contributors = await client.contributors().list({ project_id: PROJECT_ID, limit: 100, }); for (const c of contributors.items) { const langs = c.languages.map( (l: { lang_iso: string; is_writable: boolean }) => `${l.lang_iso}${l.is_writable ? "(rw)" : "(r)"}` ).join(", "); console.log(`${c.fullname} <${c.email}> — ${langs}`); }
SDK — Update contributor permissions:
typescriptawait client.contributors().update(CONTRIBUTOR_ID, { project_id: PROJECT_ID, is_reviewer: true, languages: [ { lang_iso: "fr", is_writable: true }, { lang_iso: "es", is_writable: true }, // Grant Spanish write access ], });
JSON flat (react-i18next default):
json{ "greeting.hello": "Hello", "greeting.goodbye": "Goodbye", "errors.network": "Network error" }
Download config:
typescriptconst download = await client.files().download(PROJECT_ID, { format: "json", json_unescaped_slashes: true, original_filenames: false, bundle_structure: "%LANG_ISO%.json", placeholder_format: "icu", // {name} style export_sort: "a_z", });
JSON nested (next-intl, vue-i18n):
json{ "greeting": { "hello": "Hello", "goodbye": "Goodbye" }, "errors": { "network": "Network error" } }
Download config — use _ as key separator so Lokalise nests on .:
bashset -euo pipefail lokalise2 --token "$LOKALISE_API_TOKEN" file download \ --project-id "$LOKALISE_PROJECT_ID" \ --format json \ --original-filenames=false \ --bundle-structure "%LANG_ISO%.json" \ --export-key-name-as "key_name_dot_separated" \ --unzip-to ./locales
XLIFF 1.2 (iOS, Angular):
typescriptconst download = await client.files().download(PROJECT_ID, { format: "xliff", original_filenames: false, bundle_structure: "%LANG_ISO%.xliff", export_empty_as: "empty", });
PO / GNU gettext:
bashset -euo pipefail lokalise2 --token "$LOKALISE_API_TOKEN" file download \ --project-id "$LOKALISE_PROJECT_ID" \ --format po \ --original-filenames=false \ --bundle-structure "%LANG_ISO%/LC_MESSAGES/messages.po" \ --unzip-to ./locales
Upload format auto-detection:
typescript// Lokalise detects format from filename extension // Just make sure the filename matches the content format await client.files().upload(PROJECT_ID, { data: base64Data, filename: "messages.xliff", // Triggers XLIFF parser lang_iso: "en", });
| Error | Cause | Solution | |-------|-------|----------| | 404 Project not found | Wrong project_id | Run client.projects().list() to verify | | Empty bundle (0 files) | No translations match filters | Remove include_tags / filter_langs to broaden | | 400 Invalid format | Unsupported export format string | Use: json, xliff, po, strings, xml, yaml | | Download timeout | Large project with many languages | Filter to specific languages with filter_langs | | 403 Forbidden | Contributor lacks write access | Check contributor language permissions | | curl: (28) Operation timed out | S3 bundle URL expired (valid ~30 min) | Request a fresh download URL |
typescript// scripts/fetch-translations.ts — run in CI before build import { LokaliseApi } from "@lokalise/node-api"; import { execSync } from "node:child_process"; import { mkdirSync, readdirSync } from "node:fs"; const client = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! }); const PROJECT_ID = process.env.LOKALISE_PROJECT_ID!; const download = await client.files().download(PROJECT_ID, { format: "json", original_filenames: false, bundle_structure: "%LANG_ISO%.json", export_empty_as: "base", export_sort: "a_z", replace_breaks: false, }); mkdirSync("./src/locales", { recursive: true }); execSync(`curl -sL "${download.bundle_url}" -o /tmp/i18n.zip`); execSync("unzip -o /tmp/i18n.zip -d ./src/locales"); const files = readdirSync("./src/locales").filter((f) => f.endsWith(".json")); console.log(`Downloaded ${files.length} locale files: ${files.join(", ")}`);
typescriptconst translators = [ { email: "hans@example.com", name: "Hans Mueller", langs: ["de"] }, { email: "yuki@example.com", name: "Yuki Tanaka", langs: ["ja"] }, { email: "ana@example.com", name: "Ana Garcia", langs: ["es", "pt"] }, ]; for (const t of translators) { await client.contributors().create({ project_id: PROJECT_ID, contributors: [{ email: t.email, fullname: t.name, is_admin: false, is_reviewer: false, languages: t.langs.map((l) => ({ lang_iso: l, is_writable: true })), }], }); console.log(`Invited ${t.name} for ${t.langs.join(", ")}`); }
For common errors and troubleshooting, see lokalise-common-errors. For production SDK patterns, see lokalise-sdk-patterns.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-08 | fail→pass | 19,108 | 14,007 | -27% | 1 | 1 | 0% | 2,640 | 5,416 | +105% | 0 | 0 | — |
case-01 | fail→pass | 22,099 | 15,500 | -30% | 1 | 1 | 0% | 2,779 | 5,820 | +109% | 0 | 0 | — |
case-02 | fail→pass | 23,601 | 16,038 | -32% | 1 | 1 | 0% | 3,543 | 5,865 | +66% | 0 | 0 | — |
case-03 | fail→pass | 21,035 | 9,791 | -53% | 1 | 1 | 0% | 2,460 | 4,520 | +84% | 0 | 0 | — |
case-04 | fail→pass | 17,769 | 12,249 | -31% | 1 | 1 | 0% | 2,581 | 5,108 | +98% | 0 | 0 | — |
case-05 | pass→pass | 14,731 | 11,387 | -23% | 1 | 1 | 0% | 1,858 | 4,906 | +164% | 0 | 0 | — |
case-06 | pass→pass | 15,956 | 11,180 | -30% | 1 | 1 | 0% | 1,651 | 4,886 | +196% | 0 | 0 | — |
case-07 | pass→pass | 13,967 | 8,124 | -42% | 1 | 1 | 0% | 1,810 | 4,224 | +133% | 0 | 0 | — |
case-09 | fail→pass | 19,474 | 10,934 | -44% | 1 | 1 | 0% | 2,931 | 4,941 | +69% | 0 | 0 | — |
case-10 | pass→pass | 20,161 | 11,981 | -41% | 1 | 1 | 0% | 2,417 | 5,115 | +112% | 0 | 0 | — |
case-11 | pass→pass | 20,488 | 9,240 | -55% | 1 | 1 | 0% | 2,314 | 4,531 | +96% | 0 | 0 | — |
case-12 | fail→pass | 17,021 | 12,920 | -24% | 1 | 1 | 0% | 2,157 | 5,217 | +142% | 0 | 0 | — |
case-13 | fail→pass | 21,593 | 13,364 | -38% | 1 | 1 | 0% | 2,305 | 4,893 | +112% | 0 | 0 | — |
case-14 | pass→pass | 22,942 | 4,860 | -79% | 1 | 1 | 0% | 2,705 | 4,503 | +66% | 0 | 0 | — |
case-15 | pass→pass | 12,068 | 9,628 | -20% | 1 | 1 | 0% | 1,202 | 4,228 | +252% | 0 | 0 | — |
case-16 | pass→pass | 10,162 | 10,542 | +4% | 1 | 1 | 0% | 1,846 | 4,544 | +146% | 0 | 0 | — |
case-17 | pass→pass | 31,498 | 6,118 | -81% | 1 | 1 | 0% | 4,060 | 4,926 | +21% | 0 | 0 | — |
case-18 | fail→pass | 17,976 | 16,953 | -6% | 1 | 1 | 0% | 2,256 | 5,511 | +144% | 0 | 0 | — |
case-19 | fail→pass | 17,946 | 15,037 | -16% | 1 | 1 | 0% | 2,244 | 5,479 | +144% | 0 | 0 | — |
case-20 | fail→fail | 5,132 | 10,963 | +114% | 1 | 1 | 0% | 1,142 | 4,831 | +323% | 0 | 0 | — |
case-21 | pass→pass | 12,204 | 15,175 | +24% | 1 | 1 | 0% | 1,518 | 5,148 | +239% | 0 | 0 | — |
case-22 | pass→pass | 10,921 | 10,875 | -0% | 1 | 1 | 0% | 1,226 | 4,732 | +286% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +45 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.