Skip to content

Configuration

The central configuration asset for your project.

Location: Assets/Resources/LocalizationSettings.asset

General Settings

PropertyTypeDescription
DefaultLocaleLocaleFallback language when detection fails
SupportedLocalesList<Locale>All available languages
DetectSystemLocaleboolAuto-detect user's language on startup
PreloadOnStartboolLoad all tables immediately on initialization

Tables

PropertyTypeDescription
StringTablesList<StringTable>Text translation tables
AssetTablesList<AssetTable>Asset localization tables
AddressableAssetTablesList<ScriptableObject>Async-loaded asset tables

Provider Settings

PropertyTypeDescription
DefaultProviderProviderConfigData source configuration
ProviderOverridesList<LocaleProviderOverride>Per-locale provider settings

Debugging

PropertyTypeDefaultDescription
MissingTranslationTextstring[MISSING: {0}]Format for missing keys
LogMissingTranslationsbooltrueLog warnings for missing translations
UseLocaleFormattingbooltrueUse CultureInfo for number/date formatting

Each locale defines a supported language.

csharp
public class Locale
{
    string Code;          // ISO 639-1: "en", "de", "zh-Hans"
    string DisplayName;   // English name: "German"
    string NativeName;    // Native name: "Deutsch"
    string FallbackCode;  // Fallback: "en" for "en-US"
    bool IsRTL;           // Right-to-left text
    TMP_FontAsset Font;   // Per-locale font (requires TMP)
}

Locale Code Examples

CodeLanguageRegion
enEnglish
en-USEnglishUnited States
en-GBEnglishUnited Kingdom
deGerman
de-ATGermanAustria
zh-HansChineseSimplified
zh-HantChineseTraditional
jaJapanese
arArabic— (RTL)

Provider Configuration controls where Lexis loads translation data from. This is an advanced feature - most projects using StringTable assets don't need to configure providers at all.

When to Use Provider Configuration

Use provider configuration when you need to load translations from external sources:

ScenarioSolution
All translations in StringTable assetsNo configuration needed (default)
Load translations from JSON/CSV/PO filesSet DefaultProvider
Different locales from different sourcesUse ProviderOverrides
Collaborative translation via Google SheetsConfigure Google Sheets provider

Settings Overview

PropertyTypeDescription
DefaultProviderProviderConfigThe default data source for all locales
ProviderOverridesListPer-locale overrides when some locales use different sources

ProviderConfig Fields

Each provider configuration has two fields:

FieldDescription
ProviderIdThe provider type: json, csv, po, or googlesheets
ConfigJsonJSON string with provider-specific settings

ConfigJson Examples by Provider

JSON Provider:

json
{
  "folderPath": "Assets/Localization/Strings",
  "prettyPrint": true
}

CSV Provider:

json
{
  "filePath": "Assets/Localization/strings.csv",
  "delimiter": ",",
  "hasHeaderRow": true
}

Google Sheets Provider:

json
{
  "spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
  "sheetNames": ["UI", "Dialogues", "Tutorials"]
}

Note

The sheetNames field supports multiple sheet names. Each sheet maps to a StringTable by TableId (e.g., sheet "UI" syncs with StringTable where TableId = "UI").

Example: Outsourced Japanese Translations

Your dev team manages English and German locally, but Japanese translations come from an external agency's Google Sheet:

Inspector Setup:

Provider Configuration
├── Default Provider
│   ├── Provider Id: json
│   └── Config Json: { "folderPath": "Assets/Localization" }

└── Provider Overrides
    └── [0]
        ├── Locale Code: ja
        └── Provider
            ├── Provider Id: googlesheets
            └── Config Json: { "spreadsheetId": "...", "sheetName": "Japanese" }

How it works:

  1. When loading en or de: Uses JSON files from Assets/Localization/
  2. When loading ja: Fetches from the configured Google Sheet

Example: Legacy Migration

Migrating from CSV to JSON, but keeping legacy French translations:

Provider Configuration
├── Default Provider
│   ├── Provider Id: json
│   └── Config Json: { "folderPath": "Assets/Localization/New" }

└── Provider Overrides
    └── [0]
        ├── Locale Code: fr
        └── Provider
            ├── Provider Id: csv
            └── Config Json: { "filePath": "Assets/Legacy/french.csv" }

Professional Unity Development Tools