Overview
Interface Translations
Centralized management of framework UI translations on the #/_wuic_translations/list route.
Scope
- Interface dictionary for text keys (
translation key) used in components. - Variants per language/culture (e.g.,
it-IT,en-US) with controlled fallback. - Coverage of labels, tooltips, messages, button captions, menu texts, and metadata editor.
Main Client-Side Features
- Translation loading at startup via
TranslationManagerService. - Runtime key -> value resolution with fallback on current language and default.
- Direct integration with
translatepipe in Angular templates. - UI update after metadata changes without frontend rebuild.
- Support for new keys on the fly (when metadata and routes are updated).
Main Server-Side Features
- Translation storage in a dedicated metadata table (
_wuic_translations). - AsmxProxy API for reading/updating translation packages.
- Authorization policy: translation modification limited to enabled users/roles.
Recommended Operational Flow
- Insert/update keys in
#/_wuic_translations/list. - Verify the key in the UI (
{{ 'my_key' | translate }}or runtime equivalent).
Column labels (meta-key)
Column labels (list headers, form and filter labels) are translated with a single key rule:
meta-key.<md_route_name>.<mc_nome_colonna>
with route and column exactly as stored in the metadata: the route is not trimmed (it can contain meaningful spaces, e.g. meta-key. metadati colonne.mc_id), the column is mc_nome_colonna. Two optional variants apply only in their own context: .edit for edit/detail forms, .filter for filters.
| Context | Chain (the first key present in the current language wins) |
|---|---|
| List, headers, client-side export, any other context | meta-key.<route>.<colonna> → mc_display_string_in_view |
| Edit/detail forms | meta-key.<route>.<colonna>.edit → meta-key.<route>.<colonna> → mc_display_string_in_edit |
| Filters (field-filter, filter-bar) | meta-key.<route>.<colonna>.filter → meta-key.<route>.<colonna> → the metadata value the filter uses (mc_display_string_in_edit in field-filter, mc_display_string_in_view in filter-bar) |
- Fallback: without a key for the current language the metadata value is shown, as before. An empty translation counts as missing.
.editnever applies to filters,.filternever to forms.- Where it applies: once, when the library receives the column metadata (
MetadataProviderService.mapMetadata); every component receives the labels already resolved. The original value stays available ($$labelRaw). - Language switch: labels of the open datasources are re-translated at once from the original value; the list of the current route reloads if a label changed. Other routes update the next time they are opened.
- Metadata editor: always shows and saves the raw metadata value, never the translated one.
- Reports: report headers are translated with the same keys, in the language of whoever opens the report (see Reporting, section "Reports in the viewer's language"). Excel/PDF exports generated by the server still use the metadata value.
Generating the keys from the metadata editor
The metadata editor entry Generate column translation keys (super-admin only) creates in _wuic_translations, for the current route and the 5 framework languages (it-IT, en-US, fr-FR, es-ES, de-DE):
- the base key of every column, initialised with the current view label (
mc_display_string_in_view, or the column name when it is empty); - the
.editkey only for columns whosemc_display_string_in_editis set and different frommc_display_string_in_view, initialised with the edit label.
It never overwrites existing rows and is idempotent (a second click creates 0 rows); the result shows the rows created and already present. .filter keys are not generated: add them by hand when needed. Keys longer than 255 characters (the length of resource) are skipped. With the design lock on, the entry is refused like the other metadata saves.
SQL example
INSERT INTO _wuic_translations (language, resource, translation)
VALUES ('de-DE', 'meta-key.dipendenti.cognome', 'Nachname');
INSERT INTO _wuic_translations (language, resource, translation)
VALUES ('de-DE', 'meta-key.dipendenti.cognome.edit', 'Nachname (Pflichtfeld)');
INSERT INTO _wuic_translations (language, resource, translation)
After inserting: invalidate the runtime metadata (MetaService.invalidateMetadataRuntime) and reload the page, so the client reads the translations again.
md_props_bag
For this route, mandatory extensions are normally not needed, but operational options in the table md_props_bag are useful.
{
"serverProperties": {
"queryOptimization": {
"enabled": true,
"countPolicy": "skipWhenPaged",
"sqlServerHint": "recompile"
}
serverProperties.queryOptimization.enabled: enables the optimized query branch server-side.countPolicy=skipWhenPaged: avoids total count when not needed; client-side pager remains stable during paginated navigation.sqlServerHint=recompile: useful on translation datasets with highly variable filters.endpoint.*: optional, used only if you want to force a specific source different from the default metadata-provider.
Best Practices
- Keep keys semantic and stable (
menu.sales.orders) instead of hardcoded texts. - Avoid semantic duplications between nearly identical keys.
- Manage language fallback explicitly on critical keys (error messages, confirmations, warnings).
- Align translation naming with metadata/feature naming for easier maintenance.
Screenshot
