Lokalise Local Dev Loop
Overview
Set up a fast, reproducible local development workflow for Lokalise with automatic translation sync.
Prerequisites
- Completed
lokalise-install-authsetup - Node.js 18+ with npm/pnpm
- Lokalise CLI v2 (
lokalise2) installed - Existing Lokalise project
Instructions
- For full implementation details, load:
Read(${CLAUDE_SKILL_DIR}/references/implementation-guide.md)
Output
- Working development environment with translation sync
- CLI scripts for push/pull operations
- Optional file watcher for automatic uploads
- Pre-build hooks ensure translations are current
Error Handling
| Error | Cause | Solution |
|---|---|---|
project_id not found |
Missing config | Set LOKALISE_PROJECT_ID or lokalise.json |
File not found |
Wrong path | Check bundle_structure matches src/locales |
Rate limit 429 |
Too many requests | Add delay between operations |
Polling timeout |
Large file upload | Increase poll-timeout |
Examples
Quick Pull/Push Commands
set -euo pipefail
# Pull all translations
npm run i18n:pull
# Push source strings only
npm run i18n:push
# Full sync (push then pull)
npm run i18n:sync
Environment Setup
# .env.local
LOKALISE_API_TOKEN=your-api-token
LOKALISE_PROJECT_ID=123456789.abcdef
Resources
Next Steps
See lokalise-sdk-patterns for production-ready code patterns.