Flutter · Dart · pub.dev

Flutter OTA Localization

Update translations without rebuilding or resubmitting.

Every time you change a translation key in a Flutter app, you rebuild, sign, and submit a new binary to the App Store and Google Play. TranslationsHub delivers your string updates Over-The-Air — users get them the next time they open the app, no review cycle required.

Start for free
pubspec.yaml
dependencies:
  translate_hub_handler: ^1.0.0
main.dart
await TranslateHub.shared.initialize(
  const TranslateHubConfig(apiKey: 'YOUR_KEY'),
);

Text('greeting'.translate ?? 'Hello!')

How it works

Add the SDK

One line in pubspec.yaml — no native configuration needed on iOS or Android.

Manage keys in the dashboard

Add languages, translation keys, and string values at translate-io.com. No files to commit.

Translations update daily

The SDK refreshes in the background every 24 hours. Users see new strings without updating the app.

Complete integration example

Replace your entire localization setup with this.

main.dart
// main.dart
import 'package:translate_hub_handler/translate_hub_handler.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await TranslateHub.shared.initialize(
    const TranslateHubConfig(
      apiKey: 'YOUR_API_KEY',       // from translate-io.com
      fallbackFile: 'translations', // assets/translations.json
    ),
  );
  runApp(const MyApp());
}

// In any widget:
Text('welcome'.translate ?? 'Welcome!')
Text('continue'.translate ?? 'Continue')

// Switch language at runtime:
TranslateHub.shared.pickLanguage('he');
setState(() {});

// RTL support:
final dir = TranslateHub.shared.current?.textDirection
    ?? TextDirection.ltr;
Directionality(textDirection: dir, child: ...)
Add INTERNET permission to AndroidManifest.xml — Flutter does not include it by default on Android.

Frequently asked questions

What happens if the user has no internet connection?

The SDK always starts from its local cache (SharedPreferences). On first launch with no network it falls back to a translations.json asset you bundle with the app. Once online, it refreshes silently in the background.

Does OTA affect app launch time?

No. The SDK reads from the local cache synchronously and awaits it before runApp. The network refresh happens in the background after launch. Cold-launch time is indistinguishable from a bundled ARB approach.

Can I still ship a fallback file in the binary?

Yes — and it's recommended. Place translations.json in assets/ and declare it in pubspec.yaml. The SDK uses it automatically when the cache is empty and the network is unavailable.

Does it support RTL languages like Arabic and Hebrew?

Yes. Each language entry in the JSON includes a direction field ("ltr" or "rtl"). The SDK exposes textDirection on THLanguageItem so you can wrap your widget tree in a Directionality widget.

How is the API key secured in the binary?

The API key is used only to identify your project — it cannot access your storage bucket directly. A Cloud Function validates the key, records the MAU check-in, and issues a 15-minute signed URL. The actual translations file is never exposed.

Stop waiting for App Review to fix a typo.

Start with a free account — no credit card required.

Create free account