Multi-platform localization

Quan traduïu aplicacions per a diverses plataformes (per exemple, Android i iOS), configureu components separats per a cada plataforma. La Propagació de la traducció us ajudarà a mantenir les cadenes sincronitzades.

Bones pràctiques:

  • Creeu un component per plataforma (p. ex., «MyApp Android», «MyApp iOS»).

  • Assegureu-vos que s’utilitzen cadenes i claus d’origen idèntiques a totes les plataformes sempre que sigui possible.

  • Habiliteu Permet la propagació de traduccions per reutilitzar automàticament les traduccions per a les cadenes coincidents.

Aquesta configuració evita el treball duplicat i manté les traduccions coherents entre plataformes.

Translation propagation only reuses matching strings. The source text and context have to be identical. For monolingual formats, the key has to match as well. Propagation does not convert message syntax or semantics, so strings using different placeholder syntaxes, such as Hello {name} and Hello %s, do not match.

When consumers use the same messages but require different runtime representations, consider keeping one canonical localization format and generating consumer-specific resources in the build pipeline. This also allows the generated resources to contain only the strings and languages needed by each consumer. Use separate components when translators need to maintain genuinely different messages. Disable translation propagation for these components, or assign distinct keys or contexts to platform-specific messages, so later edits do not overwrite intentional differences.