Translations and Asset Resolution
Translations live in AppConfig so screens, controls, and fragments can use locale-aware copy without hardcoding strings in view code.
Translation Dictionaries
Add locale dictionaries under translations:
{
"translations": {
"en": {
"settings": {
"language": "Language"
}
},
"es": {
"settings": {
"language": "Idioma"
}
}
}
}
Views can resolve translated text with translate('{{locale.path.to.key}}'):
Label({
text: this.translate('{{locale.settings.language}}'),
});
AppConfig can switch locale at runtime with setLocale(languageCode).
Localized Assets
URL-like values can use @locale for language-specific assets:
{
"uri": "pkg:/images/help@locale.png"
}
If the active locale is en, the value resolves to pkg:/images/help-en.png.
Use localized assets for static copy baked into imagery. Prefer text translations for labels and copy that should be accessible, measurable, or themeable.
Resolution Helpers
Fragment bindings can use $RES$ in data paths:
{
"id": "poster",
"subType": "Poster",
"uri": "${data.imageSet.$RES$}"
}
AppConfig is configured after the device resolves resolutionInfo, so $RES$ is replaced with the active suffix, such as fhd, hd, or sd, before the fragment reads item data.
Web DPI scaling is separate from AppConfig resolution. App code and style values remain in Hosanna design points.