LO

lokalise-hello-world

Provides basic code samples to initialize Lokalise projects and handle language translations.

Install

mkdir -p .claude/skills/lokalise-hello-world && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5990" && unzip -o skill.zip -d .claude/skills/lokalise-hello-world && rm skill.zip

Installs to .claude/skills/lokalise-hello-world

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create a minimal working Lokalise example.
42 charsno explicit “when” trigger
Beginner

Key capabilities

  • List existing Lokalise projects.
  • Create new Lokalise projects with specified languages.
  • Add translation keys to a project.
  • Set translations for various languages.
  • Retrieve and display all translations grouped by key.
  • Verify project and key data using the Lokalise CLI.

How it works

This skill demonstrates how to interact with the Lokalise API using both the Node.js SDK and the CLI to manage projects, keys, and translations.

Inputs & outputs

You give it
Lokalise API token, project name, language ISO codes, translation keys, translation values
You get back
Lokalise project IDs, key IDs, translation data, console logs, exported JSON files

When to use lokalise-hello-world

  • Setting up Lokalise integration
  • Testing Lokalise project configurations
  • Automating language translation tasks

About this skill

Lokalise Hello World

Overview

End-to-end walkthrough: list projects, create a test project, add keys, set translations across languages, and retrieve them. Covers both the Node SDK (@lokalise/node-api) and the CLI (lokalise2).

Prerequisites

  • Lokalise API token exported as LOKALISE_API_TOKEN
  • Node.js 18+ with @lokalise/node-api installed (npm i @lokalise/node-api)
  • Lokalise CLI v2 installed (brew install lokalise2 or binary releases)

Instructions

  1. List all projects using the SDK and CLI.
import { LokaliseApi } from "@lokalise/node-api";

const client = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });

const projects = await client.projects().list({ page: 1, limit: 20 });
for (const p of projects.items) {
  console.log(`${p.project_id}  ${p.name}  (${p.statistics.languages} languages)`);
}
set -euo pipefail
lokalise2 --token "$LOKALISE_API_TOKEN" project list
  1. Create a test project with three languages.
const project = await client.projects().create({
  name: "hello-world-test",
  description: "Quick start demo",
  languages: [
    { lang_iso: "en", custom_name: "English" },
    { lang_iso: "fr", custom_name: "French" },
    { lang_iso: "de", custom_name: "German" },
  ],
  base_language_iso: "en",
});

const PROJECT_ID = project.project_id;
console.log(`Created project: ${PROJECT_ID}`);
  1. Add translation keys with their English (base language) translations in a single call.
const keys = await client.keys().create({
  project_id: PROJECT_ID,
  keys: [
    {
      key_name: { web: "greeting.hello" },
      platforms: ["web"],
      translations: [{ language_iso: "en", translation: "Hello" }],
    },
    {
      key_name: { web: "greeting.goodbye" },
      platforms: ["web"],
      translations: [{ language_iso: "en", translation: "Goodbye" }],
    },
    {
      key_name: { web: "app.title" },
      platforms: ["web"],
      translations: [{ language_iso: "en", translation: "My Application" }],
    },
  ],
});

console.log(`Created ${keys.items.length} keys`);
  1. Set translations for French and German by retrieving key IDs and updating each translation.
const allKeys = await client.keys().list({
  project_id: PROJECT_ID,
  limit: 100,
});

const translations: Record<string, Record<string, string>> = {
  "greeting.hello":   { fr: "Bonjour",         de: "Hallo" },
  "greeting.goodbye": { fr: "Au revoir",       de: "Auf Wiedersehen" },
  "app.title":        { fr: "Mon Application",  de: "Meine Anwendung" },
};

for (const key of allKeys.items) {
  const keyName = key.key_name.web;
  const langs = translations[keyName];
  if (!langs) continue;

  for (const [langIso, value] of Object.entries(langs)) {
    const existing = key.translations.find(
      (t: { language_iso: string }) => t.language_iso === langIso
    );
    if (existing) {
      await client.translations().update(existing.translation_id, {
        project_id: PROJECT_ID,
        translation: value,
      });
    }
  }
}

console.log("Translations set for fr and de");
  1. Retrieve and display all translations grouped by key.
const result = await client.translations().list({
  project_id: PROJECT_ID,
  page: 1,
  limit: 100,
});

const grouped = new Map<number, { key: string; langs: Record<string, string> }>();
for (const t of result.items) {
  if (!grouped.has(t.key_id)) {
    grouped.set(t.key_id, { key: `key:${t.key_id}`, langs: {} });
  }
  grouped.get(t.key_id)!.langs[t.language_iso] = t.translation;
}

for (const [, entry] of grouped) {
  console.log(`\n${entry.key}`);
  for (const [lang, text] of Object.entries(entry.langs)) {
    console.log(`  ${lang}: ${text}`);
  }
}
  1. Verify via CLI by listing keys and exporting translations.
set -euo pipefail
PROJECT_ID="YOUR_PROJECT_ID"

# List keys
lokalise2 --token "$LOKALISE_API_TOKEN" key list \
  --project-id "$PROJECT_ID" \
  --limit 100

# Export all translations as JSON
lokalise2 --token "$LOKALISE_API_TOKEN" file download \
  --project-id "$PROJECT_ID" \
  --format json \
  --original-filenames=false \
  --bundle-structure "%LANG_ISO%.json" \
  --unzip-to ./locales

Output

  • A new Lokalise project with 3 keys and translations in 3 languages
  • Console output showing all key/translation pairs
  • Exported JSON files in ./locales/ (if CLI step run)

Error Handling

ErrorCauseSolution
401 UnauthorizedInvalid or expired API tokenVerify LOKALISE_API_TOKEN is set and valid
400 Bad RequestMissing required fields (e.g., key_name)Check payload matches API schema
404 Not FoundProject ID does not existRun project list to get correct ID
429 Too Many RequestsExceeded 6 req/sec rate limitAdd 170ms delay between calls or batch operations
Cannot find moduleSDK not installedRun npm i @lokalise/node-api

Examples

Minimal One-File Script

// hello-lokalise.ts — run with: npx tsx hello-lokalise.ts
import { LokaliseApi } from "@lokalise/node-api";

const api = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });

// Create project
const proj = await api.projects().create({
  name: `demo-${Date.now()}`,
  languages: [{ lang_iso: "en" }, { lang_iso: "es" }],
  base_language_iso: "en",
});

// Add a key with translations
await api.keys().create({
  project_id: proj.project_id,
  keys: [{
    key_name: { web: "welcome" },
    platforms: ["web"],
    translations: [
      { language_iso: "en", translation: "Welcome" },
      { language_iso: "es", translation: "Bienvenido" },
    ],
  }],
});

// Read it back
const translations = await api.translations().list({
  project_id: proj.project_id,
  limit: 10,
});

for (const t of translations.items) {
  console.log(`[${t.language_iso}] ${t.translation}`);
}

// Cleanup
await api.projects().delete(proj.project_id);
console.log("Project deleted");

CLI-Only Quick Test

set -euo pipefail

# Create project
PROJECT=$(lokalise2 --token "$LOKALISE_API_TOKEN" project create \
  --name "cli-test-$(date +%s)" \
  --base-language-iso en \
  --languages '[{"lang_iso":"en"},{"lang_iso":"ja"}]' 2>&1)

PROJECT_ID=$(echo "$PROJECT" | grep -oP 'Project ID: \K[^\s]+')

# Upload a source file
echo '{"hello":"Hello","bye":"Bye"}' > /tmp/en.json
lokalise2 --token "$LOKALISE_API_TOKEN" file upload \
  --project-id "$PROJECT_ID" \
  --file /tmp/en.json \
  --lang-iso en \
  --poll

echo "Project $PROJECT_ID created and source uploaded"

Resources

Next Steps

Proceed to lokalise-local-dev-loop for development workflow setup, or lokalise-core-workflow-a for file upload and key management.

Prerequisites

Lokalise API token exported as `LOKALISE_API_TOKEN`Node.js 18+ with `@lokalise/node-api` installedLokalise CLI v2 installed

Limitations

  • Exceeding 6 req/sec rate limit can cause `429 Too Many Requests` errors.
  • Missing required fields like `key_name` can result in `400 Bad Request`.
  • Invalid or expired API tokens lead to `401 Unauthorized` errors.

How it compares

This skill provides a complete end-to-end workflow for Lokalise, covering project setup, key creation, translation management, and verification, which goes beyond basic API interaction.

Compared to similar skills

lokalise-hello-world side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
lokalise-hello-world (this skill)125dReviewBeginner
mcp-builder1363moReviewAdvanced
telegram-bot-builder1066moReviewIntermediate
telegram-mini-app626moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

mcp-builder

anthropics

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

136215

telegram-bot-builder

davila7

Expert in building Telegram bots that solve real problems - from simple automation to complex AI-powered bots. Covers bot architecture, the Telegram Bot API, user experience, monetization strategies, and scaling bots to thousands of users. Use when: telegram bot, bot api, telegram automation, chat bot telegram, tg bot.

106130

telegram-mini-app

davila7

Expert in building Telegram Mini Apps (TWA) - web apps that run inside Telegram with native-like experience. Covers the TON ecosystem, Telegram Web App API, payments, user authentication, and building viral mini apps that monetize. Use when: telegram mini app, TWA, telegram web app, TON app, mini app.

62163

stripe-integration

wshobson

Implement Stripe payment processing for robust, PCI-compliant payment flows including checkout, subscriptions, and webhooks. Use when integrating Stripe payments, building subscription systems, or implementing secure checkout flows.

48165

n8n-expression-syntax

czlonkowski

Validate n8n expression syntax and fix common errors. Use when writing n8n expressions, using {{}} syntax, accessing $json/$node variables, troubleshooting expression errors, or working with webhook data in workflows.

6111

langchain-architecture

wshobson

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

899

Search skills

Search the agent skills registry