v1.0.0 Stable Official Unity SDK

Integrating LocaleHub

Real-time Localization-as-a-Service for Unity. Pushing translation updates without resubmitting to the App Store.

Installation

1. Dependencies

LocaleHub requires Newtonsoft.Json. Install via Unity Package Manager (UPM):

com.unity.nuget.newtonsoft-json

2. Get the SDK Package

Download the latest .unitypackage and import it into your project.

View v1.0.0 Release
Assets > Import Package > Custom Package

SDK Architecture

LocaleHub/
├── Runtime/
│   ├── cache/             // Local persistent JSON fallbacks
│   │   ├── en.json, es.json...
│   │   └── LocaleHubCache.cs
│   ├── Components/        // UI drop-ins
│   │   ├── LocaleHubLanguageSwitcher.cs
│   │   └── LocaleHubTextUniversal.cs
│   ├── Core/              // Engine Logic
│   │   ├── LocaleHubAPI.cs
│   │   └── LocaleHubManager.cs
│   └── Utils/             // Debugging & Serializers
└── Editor/                // Inspector extensions

Video Walkthrough

Integration Code

LocaleHubController.cs
using LocaleHub; 
using UnityEngine;

public class LocaleHubController : MonoBehaviour 
{
    void Start() 
    {
        // Sync language with Britoken dashboard
        LocaleHubManager.Instance.SetLanguage("en");

        // Access translations
        string welcome = LocaleHubManager.Instance.GetText("welcome_text");
    }
}

UI Components

LocaleHubTextUniversal

Support for both Legacy UI Text and TextMeshPro in a single component.

Auto-Refresh enabled

LocaleHubLanguageSwitcher

Instantly build language menus that trigger the SDK's internal language swap.

Dropdown & Button support

OTA & Caching

Automatic OTA

The SDK stays synchronized with the Britoken Dashboard. Updates reflect instantly without restarts.

Offline Persistence

Managed via LocaleHubCache.cs. Translations are cached locally. If internet is lost, the SDK falls back to the last update.

API Reference

MemberSummary
SetLanguage(string)Updates active locale and triggers a background sync.
GetText(string)Returns the translated string for a specific key.
IsUsingCacheBoolean indicating if the SDK is currently in offline fallback mode.

REST API (Standalone)

Fetch your translations directly via standard HTTPS POST requests. Use this for web integrations, custom backends, or any non-Unity environment.

Request (cURL)
curl -X POST "https://apis.langaihub.com/localization" \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -d '{ "projectId": "YOUR_PROJECT_ID", "lang": "ur" }'
Response Body
{ "success": true, "translations": { "You deserve a job that loves you back": "آپ ایسی نوکری کے مستحق ہیں جو آپ سے پیار کرتا ہے۔", "create": "بنائیں", "fire": "آگ", "snow": "برف" } }