Deploy Lokalise integrations to Vercel, Netlify, and Cloud Run platforms.
Use when deploying apps with Lokalise translations to production,
configuring platform-specific secrets, or setting up deployment pipelines.
Trigger with phrases like "deploy lokalise", "lokalise Vercel",
"lokalise production deploy", "lokalise Netlify", "lokalise Cloud Run".
Translations must be downloaded fresh during CI/CD builds to ensure production always ships the latest reviewed content. This skill covers downloading translations as a build step, GitHub Actions workflows for translation sync, Vercel and Netlify build plugin integration, OTA (over-the-air) updates for mobile apps via Lokalise's iOS and Android SDKs, and environment-specific translation bundles.
Prerequisites
Lokalise API token with download permissions (read-only token recommended for CI)
LOKALISE_API_TOKEN and LOKALISE_PROJECT_ID stored as CI secrets
curl and unzip available in CI environment (standard on GitHub Actions runners)
For OTA: Lokalise OTA SDK token (separate from API token, generated in Lokalise dashboard)
Instructions
1. Download Translations in the Build Step
Add a pre-build script that pulls translations from Lokalise before your framework compiles:
Over-the-air updates let you push translation changes without an app store release. Lokalise provides native SDKs for this.
iOS (Swift):
// AppDelegate.swift
import Lokalise
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Initialize with OTA SDK token and project ID
Lokalise.shared.setProjectID(
"123456789.abcdefgh",
token: "ota-sdk-token-from-lokalise-dashboard"
)
// Preemptively check for updates
Lokalise.shared.checkForUpdates { updated, error in
if let error = error {
print("OTA update check failed: \(error.localizedDescription)")
return
}
if updated {
print("Translations updated OTA")
}
}
return true
}
// Usage — works with NSLocalizedString automatically
let welcome = NSLocalizedString("welcome.title", comment: "Welcome screen title")
Android (Kotlin):
// Application.kt
import com.lokalise.sdk.Lokalise
import com.lokalise.sdk.LokaliseCallback
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
Lokalise.init(this)
Lokalise.updateTranslations()
// Optional: listen for update completion
Lokalise.setUpdateCallback(object : LokaliseCallback {
override fun onUpdated(oldBundleId: Long, newBundleId: Long) {
Log.d("Lokalise", "Translations updated: $oldBundleId -> $newBundleId")
}
override fun onErrorOccurred(e: LokaliseException) {
Log.e("Lokalise", "OTA update failed", e)
}
})
}
}
// Usage — strings.xml values are overridden by OTA bundles
val welcome = getString(R.string.welcome_title)
Both SDKs fall back to the bundled translations if OTA download fails, so the app always has working strings.
6. Environment-Specific Translation Bundles
Use tags in Lokalise to manage environment-specific content:
# Download only production-tagged translations
./scripts/download-translations.sh ./src/locales # uses "production" tag filter
# For staging: modify the script or use an env var
LOKALISE_TAGS="staging,beta" ./scripts/download-translations.sh ./src/locales
Update download-translations.sh to support dynamic tags:
# Add near the top of download-translations.sh
TAGS="${LOKALISE_TAGS:-production}"
TAG_JSON=$(echo "$TAGS" | jq -R 'split(",")' )
# Use in the curl payload:
# "include_tags": $TAG_JSON
This lets you maintain separate translation sets:
production — fully reviewed, stable translations
staging — includes new translations under review
beta — experimental copy for A/B testing
Output
CI/CD pipeline downloading fresh translations before every build
GitHub Actions workflow with translation validation and deployment
Vercel/Netlify configured with Lokalise secrets and build commands
Mobile apps receiving OTA translation updates without app store releases
Environment-specific bundles controlled by Lokalise tags
For handling errors during API calls in your pipeline, see lokalise-common-errors. For managing translation data formats and encoding, see lokalise-data-handling.