# avlorayne/localization architecture

> Architecture diagram of the GitHub repository avlorayne/localization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/avlorayne/localization
- Repository: https://github.com/avlorayne/localization
- Video tour (about a minute): https://gitdiagram.com/avlorayne/localization/video

## Overview

Localization for Unity turns designer-maintained CSV/XLSX sheets into validated Unity language-data assets, then provides runtime template lookup with language fallback. The graph follows the documented conversion-to-lookup workflow and includes editor configuration, export, inspector/TMP tooling, and Addressables loading. The excerpts do not include the conversion baker, registrar, runtime system, or template resolver implementations, so their documented roles are shown without inferring finer internal call sequences.

Main entry points: [`Runtime/System/LocalizationSystem.cs`](https://github.com/avlorayne/localization/blob/master/Runtime/System/LocalizationSystem.cs) (Localization system), [`Editor/Core/LanguageConfigBaker.cs`](https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageConfigBaker.cs) (Config baker), [`Editor/Source/LocalizationSourceParser.cs`](https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceParser.cs) (Source parser), [`Runtime/Data/LanguageDataLoader.cs`](https://github.com/avlorayne/localization/blob/master/Runtime/Data/LanguageDataLoader.cs) (Language data loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Editor authoring"]
  node_settings["Language settings"]
  node_inspector["Asset inspector"]
  node_tmp["TMP key picker"]
end

subgraph group_conversion["Source conversion"]
  node_sheets["CSV/XLSX sheets"]
  node_baker["Config baker"]
  node_sourceparser["Source parser"]
  node_csvparser["CSV parser<br/>[CsvParser.cs]"]
  node_xlsxparser["XLSX parser"]
  node_schema["Source schema"]
  node_exporter["Source exporter"]
  node_xlsxexport["XLSX exporter"]
  node_csvconvert["CSV converter"]
end

subgraph group_runtime["Runtime localization"]
  node_dataasset["Language data asset<br/>[LanguageDataSO.cs]"]
  node_configasset["Runtime config"]
  node_system["Localization system"]
  node_loader["Language data loader"]
  node_lookup["Namespace lookup"]
  node_languageentry["Localized entries"]
  node_templateparser["Template parser"]
  node_resolver["Template resolver"]
end

subgraph group_integrations["Unity integrations"]
  node_registrar["Addressables registrar"]
end

node_designer(("Designer"))
node_addressables[("Addressables")]
node_programmer(("Programmer"))

node_designer -->|"edits"| node_sheets
node_sheets -->|"converts"| node_baker
node_baker -->|"imports"| node_sourceparser
node_sourceparser -->|"dispatches"| node_csvparser
node_sourceparser -->|"dispatches"| node_xlsxparser
node_csvparser -->|"normalizes entries"| node_schema
node_xlsxparser -->|"normalizes entries"| node_schema
node_baker -->|"generates"| node_dataasset
node_baker -->|"registers assets"| node_registrar
node_registrar -->|"registers"| node_addressables
node_settings -->|"bakes config"| node_configasset
node_programmer -->|"requests text"| node_system
node_system -->|"loads language data"| node_loader
node_loader -->|"loads assets"| node_addressables
node_loader -->|"returns asset"| node_dataasset
node_system -->|"looks up text"| node_lookup
node_lookup -->|"loads missing namespace"| node_loader
node_lookup -->|"reads localized values"| node_languageentry
node_system -->|"parses templates"| node_templateparser
node_system -->|"resolves templates"| node_resolver
node_resolver -->|"looks up placeholders"| node_lookup
node_inspector -->|"edits entries"| node_dataasset
node_inspector -->|"imports source"| node_sourceparser
node_tmp -->|"offers localization keys"| node_dataasset
node_exporter -->|"exports CSV"| node_csvconvert
node_exporter -->|"exports XLSX"| node_xlsxexport
node_csvconvert -->|"writes CSV"| node_sheets
node_xlsxexport -->|"writes XLSX"| node_sheets

click node_baker "https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageConfigBaker.cs"
click node_sourceparser "https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceParser.cs"
click node_csvparser "https://github.com/avlorayne/localization/blob/master/Editor/Source/CsvParser.cs"
click node_xlsxparser "https://github.com/avlorayne/localization/blob/master/Editor/Source/XlsxLocalizationParser.cs"
click node_schema "https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceSchema.cs"
click node_dataasset "https://github.com/avlorayne/localization/blob/master/Runtime/Data/LanguageDataSO.cs"
click node_registrar "https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageDataSOAddressableRegistrar.cs"
click node_settings "https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageProjectSettings.cs"
click node_configasset "https://github.com/avlorayne/localization/blob/master/Runtime/System/LanguageConfigSO.cs"
click node_system "https://github.com/avlorayne/localization/blob/master/Runtime/System/LocalizationSystem.cs"
click node_loader "https://github.com/avlorayne/localization/blob/master/Runtime/Data/LanguageDataLoader.cs"
click node_lookup "https://github.com/avlorayne/localization/blob/master/Runtime/System/LocalizationLookup.cs"
click node_languageentry "https://github.com/avlorayne/localization/blob/master/Runtime/Data/LocalizationData.cs"
click node_templateparser "https://github.com/avlorayne/localization/blob/master/Runtime/Utility/LocalizationTemplateParser.cs"
click node_resolver "https://github.com/avlorayne/localization/blob/master/Runtime/Utility/LocalizationTemplateResolver.cs"
click node_inspector "https://github.com/avlorayne/localization/blob/master/Editor/Inspector/LanguageDataSOEditor.cs"
click node_tmp "https://github.com/avlorayne/localization/blob/master/Editor/TMPExtra/LocalizedTextMeshProTool.cs"
click node_exporter "https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceExporter.cs"
click node_xlsxexport "https://github.com/avlorayne/localization/blob/master/Editor/Source/XlsxLocalizationExporter.cs"
click node_csvconvert "https://github.com/avlorayne/localization/blob/master/Editor/Core/LocalizationCSVConverter.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_settings,node_inspector,node_tmp toneBlue
class node_sheets,node_baker,node_sourceparser,node_csvparser,node_xlsxparser,node_schema,node_exporter,node_xlsxexport,node_csvconvert,node_addressables toneAmber
class node_dataasset,node_configasset,node_system,node_loader,node_lookup,node_languageentry,node_templateparser,node_resolver toneMint
class node_registrar toneRose
class node_designer,node_programmer toneIndigo
```

## Components

### Editor authoring

- [Language settings](https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageProjectSettings.cs): `Editor/Core/LanguageProjectSettings.cs`
- [Asset inspector](https://github.com/avlorayne/localization/blob/master/Editor/Inspector/LanguageDataSOEditor.cs): `Editor/Inspector/LanguageDataSOEditor.cs`
- [TMP key picker](https://github.com/avlorayne/localization/blob/master/Editor/TMPExtra/LocalizedTextMeshProTool.cs): `Editor/TMPExtra/LocalizedTextMeshProTool.cs`

### Source conversion

- **CSV/XLSX sheets**
- [Config baker](https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageConfigBaker.cs): `Editor/Core/LanguageConfigBaker.cs`
- [Source parser](https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceParser.cs): `Editor/Source/LocalizationSourceParser.cs`
- [CSV parser](https://github.com/avlorayne/localization/blob/master/Editor/Source/CsvParser.cs): `Editor/Source/CsvParser.cs`
- [XLSX parser](https://github.com/avlorayne/localization/blob/master/Editor/Source/XlsxLocalizationParser.cs): `Editor/Source/XlsxLocalizationParser.cs`
- [Source schema](https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceSchema.cs): `Editor/Source/LocalizationSourceSchema.cs`
- [Source exporter](https://github.com/avlorayne/localization/blob/master/Editor/Source/LocalizationSourceExporter.cs): `Editor/Source/LocalizationSourceExporter.cs`
- [XLSX exporter](https://github.com/avlorayne/localization/blob/master/Editor/Source/XlsxLocalizationExporter.cs): `Editor/Source/XlsxLocalizationExporter.cs`
- [CSV converter](https://github.com/avlorayne/localization/blob/master/Editor/Core/LocalizationCSVConverter.cs): `Editor/Core/LocalizationCSVConverter.cs`

### Runtime localization

- [Language data asset](https://github.com/avlorayne/localization/blob/master/Runtime/Data/LanguageDataSO.cs): `Runtime/Data/LanguageDataSO.cs`
- [Runtime config](https://github.com/avlorayne/localization/blob/master/Runtime/System/LanguageConfigSO.cs): `Runtime/System/LanguageConfigSO.cs`
- [Localization system](https://github.com/avlorayne/localization/blob/master/Runtime/System/LocalizationSystem.cs): `Runtime/System/LocalizationSystem.cs`
- [Language data loader](https://github.com/avlorayne/localization/blob/master/Runtime/Data/LanguageDataLoader.cs): `Runtime/Data/LanguageDataLoader.cs`
- [Namespace lookup](https://github.com/avlorayne/localization/blob/master/Runtime/System/LocalizationLookup.cs): `Runtime/System/LocalizationLookup.cs`
- [Localized entries](https://github.com/avlorayne/localization/blob/master/Runtime/Data/LocalizationData.cs): `Runtime/Data/LocalizationData.cs`
- [Template parser](https://github.com/avlorayne/localization/blob/master/Runtime/Utility/LocalizationTemplateParser.cs): `Runtime/Utility/LocalizationTemplateParser.cs`
- [Template resolver](https://github.com/avlorayne/localization/blob/master/Runtime/Utility/LocalizationTemplateResolver.cs): `Runtime/Utility/LocalizationTemplateResolver.cs`

### Unity integrations

- [Addressables registrar](https://github.com/avlorayne/localization/blob/master/Editor/Core/LanguageDataSOAddressableRegistrar.cs): `Editor/Core/LanguageDataSOAddressableRegistrar.cs`

### Other components

- **Designer**
- **Addressables**
- **Programmer**

## Connections

- Designer → CSV/XLSX sheets: edits
- CSV/XLSX sheets → Config baker: converts
- Config baker → Source parser: imports
- Source parser → CSV parser: dispatches
- Source parser → XLSX parser: dispatches
- CSV parser → Source schema: normalizes entries
- XLSX parser → Source schema: normalizes entries
- Config baker → Language data asset: generates
- Config baker → Addressables registrar: registers assets
- Addressables registrar → Addressables: registers
- Language settings → Runtime config: bakes config
- Programmer → Localization system: requests text
- Localization system → Language data loader: loads language data
- Language data loader → Addressables: loads assets
- Language data loader → Language data asset: returns asset
- Localization system → Namespace lookup: looks up text
- Namespace lookup → Language data loader: loads missing namespace
- Namespace lookup → Localized entries: reads localized values
- Localization system → Template parser: parses templates
- Localization system → Template resolver: resolves templates
- Template resolver → Namespace lookup: looks up placeholders
- Asset inspector → Language data asset: edits entries
- Asset inspector → Source parser: imports source
- TMP key picker → Language data asset: offers localization keys
- Source exporter → CSV converter: exports CSV
- Source exporter → XLSX exporter: exports XLSX
- CSV converter → CSV/XLSX sheets: writes CSV
- XLSX exporter → CSV/XLSX sheets: writes XLSX
