LOCALIZATION / VIEWS
Translate visible copy with i18n
Translate visible Views copy from Dowe catalogs without branching by platform or locale. A key connects the component to every locale catalog, while the authored text remains the deterministic fallback.
1 / MENTAL MODEL
One key, one source fallback, every target
Dowe validates catalogs before generation and lowers each localized value through the shared Views model. Read the setup in this order: define catalogs, add fallback copy, then reference keys from views.
Part | Owns | How it works |
|---|---|---|
No dataThere are no records to display | ||
2 / SMALLEST VALID SETUP
Declare every key in every locale
Exactly one catalog must declare default:true. Nested node names form dot-separated keys. The Spanish catalog mirrors the English key shape and changes only the values.
i18n/en.dowe — default catalog
This file supplies the source values used when no more specific locale is selected.
translations default:true
home
hero
title "Build systems with Dowe"
summary "One source model for every target."
actions
start "Get started"i18n/es.dowe — translated catalog
This file keeps the same nested keys so every reference has a value in every locale.
translations
home
hero
title "Construye sistemas con Dowe"
summary "Un modelo fuente para cada target."
actions
start "Comenzar"views/pages/home-page.dowe — reference the keys
The page keeps readable English fallback children while i18n points to the matching catalog paths.
page HomePage
Section
Title i18n:"home.hero.title"
"Build systems with Dowe"
Text i18n:"home.hero.summary"
"One source model for every target."
Button i18n:"home.actions.start" href:"/docs"
"Get started"3 / SUPPORTED SURFACES
Localize copy where the component contract allows it
The i18n prop always points to a quoted key and never replaces the required fallback. Secondary keys follow the same rule: their fallback prop must be present before the localized value can be used.
Surface | Where it appears | Rule |
|---|---|---|
No dataThere are no records to display | ||
Example — navigation labels with secondary copy
Add every referenced key to every locale catalog before using this pattern. The label, description, and status values remain readable fallbacks in the source file.
SideNav
item:
label:"Guides"
i18n:"navigation.guides"
description:"Learn Dowe"
descriptionI18n:"navigation.guidesDescription"
status:"New"
statusI18n:"navigation.new"
href:"/guides"
Tabs
tab id:"overview" label:"Overview" i18n:"tabs.overview"
Text
"Overview content"4 / VALIDATION
Localization errors stop before generation
The compiler checks the catalog contract and every referenced key before it generates a target. Fix the source catalogs instead of adding target-specific conditionals to a page.
Validation | What Dowe checks |
|---|---|
No dataThere are no records to display | |
Compatibility entry
The explicit translation entry remains supported, but nested groups are easier to scan and maintain.
translations default:true
translation key:"actions.save" value:"Save"5 / TARGET OUTPUT
Locale selection stays platform-owned
The same catalog model feeds each target, but the generated runtime chooses the platform-native lookup and output format.
Target | Generated behavior |
|---|---|
No dataThere are no records to display | |