Багатоплатформна локалізація¶
Під час перекладу програм для кількох платформ (наприклад, Android та iOS) налаштовуйте окремі компоненти для кожної платформи. Синхронізація перекладу допоможе вам синхронізувати рядки.
Найкращі практики:
Створіть один компонент для кожної платформи (наприклад, MyApp Android, MyApp iOS).
Переконайтеся, що на всіх платформах використовуються однакові вихідні рядки та ключі, де це можливо.
Увімкніть Дозволити поширення перекладу для автоматичного повторного використання перекладів для збігів рядків.
Таке налаштування дозволяє уникнути дублювання роботи та забезпечує узгодженість перекладів на різних платформах.
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.