Platform Integrations Overview
LangCTL supports 6+ export formats, making it easy to integrate with any platform. Export translations, integrate into your app, and automate the workflow.
Supported Platforms
Web Frameworks
- React - i18next, react-i18next
- Vue.js - vue-i18n
- Angular - @angular/localize, ngx-translate
- Next.js - next-i18next
- Svelte - svelte-i18n
- Generic - Flat or nested JSON
Mobile (Native)
- iOS - Localizable.strings, NSLocalizedString
- Android - strings.xml, Resources
- Swift - String catalogs
- Kotlin - Android resources
Cross-Platform
- Flutter - ARB files, intl package
- React Native - i18next, react-i18next
- Expo - expo-localization
- Ionic - @ionic/angular with i18next
Integration Workflow
langctl export my-app -l en -f i18next -o ./locales/en.json
langctl export my-app -l es -f i18next -o ./locales/es.json
git add locales/*.json
git commit -m "Update translations"
npm run build
npm run deploy npm install i18next react-i18next
langctl export my-app -l en,es,fr -f i18next -o ./public/locales
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
i18n
.use(initReactI18next)
.init({
resources: {
en: { translation: require('./locales/en.json') },
es: { translation: require('./locales/es.json') }
},
lng: 'en',
fallbackLng: 'en'
});
// Use in components
import { useTranslation } from 'react-i18next';
function App() {
const { t } = useTranslation();
return <h1>{t('home.welcome')}</h1>;
} langctl export my-app -l en -f android-xml -o app/src/main/res/values/strings.xml
langctl export my-app -l es -f android-xml -o app/src/main/res/values-es/strings.xml
// Kotlin
val welcome = getString(R.string.home_welcome)
binding.textView.text = getString(R.string.home_welcome, username)
// Java
String welcome = getString(R.string.home_welcome);
textView.setText(getString(R.string.home_welcome, username)); langctl export my-app -l en -f ios-strings -o Resources/en.lproj/Localizable.strings
langctl export my-app -l es -f ios-strings -o Resources/es.lproj/Localizable.strings
// Swift
let welcome = NSLocalizedString("home.welcome", comment: "")
let greeting = String(format: NSLocalizedString("home.welcome", comment: ""), username)
// SwiftUI
Text(LocalizedStringKey("home.welcome")) langctl export my-app -l en -f flutter-arb -o lib/l10n/app_en.arb
langctl export my-app -l es -f flutter-arb -o lib/l10n/app_es.arb
flutter:
generate: true
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
AppLocalizations.of(context)!.homeWelcome LangCTL automatically converts parameter syntax for each platform:
| Platform | Input | Output |
|---|---|---|
| Web (i18next) | {{username}} | {{username}} |
| Android | {{username}} | %1$s |
| iOS | {{username}} | %@ |
| Flutter | {{username}} | {username} |
ℹ️
Note
Always write translations using {{param}} syntax in LangCTL. The export process handles platform-specific conversion automatically.
Automate translation exports in your build pipeline:
name: Export Translations
on:
schedule:
- cron: '0 0 * * *'
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Export translations
run: |
npm install -g langctl
langctl auth ${{ secrets.LANGCTL_API_KEY }}
langctl export my-project -l en -o ./locales/en.json Commit exported translation files to git:
- Track changes over time
- Enable code review for translations
- Rollback capability
- Consistent across environments
Use CLI in build scripts:
{
"scripts": {
"prebuild": "langctl export my-app --all-languages -o ./locales",
"build": "vite build"
}
} Export only published translations for production:
langctl export my-app -l en --published-only Export specific modules for code-splitting:
langctl export my-app -l en --module auth -o ./auth-en.json
langctl export my-app -l en --module dashboard -o ./dashboard-en.json 5. Cache Translation Files
Implement caching for better performance:
- Bundle translations with app
- Use CDN for web apps
- Enable app-level caching
- Lazy-load language files
Platform-Specific Guides
Choose your platform for detailed integration instructions:
- Web Frameworks - React, Vue, Angular, Next.js
- iOS & Android - Native mobile development
- Cross-Platform - Flutter, React Native
- CI/CD - Automated workflows
- Version Control - Git integration
Need Help?
- Export Guide - Learn about export formats
- CLI Export - Command-line export
- FAQ - Common questions