-
Notifications
You must be signed in to change notification settings - Fork 1
Localization
Multi-language in eQuantic.UI follows one law: the developer localizes with what .NET itself
offers — .resx, the strongly-typed accessor, CultureInfo — and never sees a JavaScript
catalog or a framework DSL. The full design (Track L: how eqc bridges ResourceManager into
the browser, per-culture catalogs, the formatting subset, the honest fences) lives in the repo at
docs/I18N-PLAN.md. This page documents what is shipped today and what is still design.
Since 0.2.0-preview.24
Components never hardcode a user-facing string. Every built-in label — the toggle announcements a
screen reader hears ("Checked", "On"), the dismiss affordances, the search placeholder, the code
editor's find bar — reads SdkStrings, a static class of properties (never consts: a const
crosses assemblies by VALUE, and inlined call sites would keep announcing the build machine's
language after the seam learns cultures). The transpiled twins confirm the choke point survives on
the web too: eqc emits static getters and the components reference them. When Track L lands, the
property bodies swap to the resx-backed accessor and no component changes.
Since 0.2.0-preview.24
A GUI process launched from Finder carries no LANG/LC_*, so .NET starts invariant even on a
pt-BR machine. The shells resolve the platform's locale truth before the first frame —
NSLocale.preferredLanguages[0] as the UI culture and currentLocale as the format culture on
Apple (the same split .NET models as CurrentUICulture vs CurrentCulture), Locale.getDefault()
feeding both on Android — and PhotonCultureController copies the pair onto the process statics,
repainting on a later Apply exactly as the theme controller repaints on a mode flip. Because
Photon runs real .NET with no transpilation, ResourceManager and satellite assemblies already
work there: a native app localizes today with ordinary resx.
The web bridge is the engineered part and none of it has shipped yet: eqc rewriting resource
accessors to runtime lookups (never inlining them), per-culture catalogs emitted from the keys the
app actually uses, the __EQ_CULTURE__ shell slot mirroring the theme bridge, setCulture
re-rendering without a reload, the CultureInfo → Intl formatting subset with its build-time
diagnostic, and the SDK's own strings riding satellite resources. Culture-aware formatting in
transpiled code today follows the browser's locale, not the request's — that divergence is named
in the plan and swept by its formatting workstream. RTL and per-script font coverage are
explicitly other tracks.
🌐 English · Português
🏁 Start here
📱 Write-once
- Write-Once Components
- Declarative Surface
- Photon Engine
- Design System
- Capabilities
- Storage
- Forms
- Code Editor
- Markdown
- Mermaid
- Email Rendering
🏗️ Architecture
⚙️ Compilation
- Compiler
- Compile-Time Evaluation
- Supported C# Features
- External Type Resolution
- Build Flow
- Diagnostics
⚡ Runtime
🔌 Server
🎨 Ecosystem
🚀 Development