Tristate
Tristate

Reputation: 1821

How to translate a text with a variable

Let say I want to translate

The Price is 2,99 EUR until next monday.

This 2,99 is variable and can change. My Angular HTML part of this is like.

<div>The Price is {{ price| currency: 'EUR' }} until next monday.</div>

Are they any best practice for translating this in app.phrase.com tool?

Upvotes: 0

Views: 54

Answers (1)

Pritam Ghosh
Pritam Ghosh

Reputation: 61

To translate dynamic content like variable prices using a tool like app.phrase.com, keep static and dynamic parts separate, utilizing a placeholder variable (e.g., %price%) for dynamic elements while providing clear context and documentation for translators. This approach ensures accurate translations while preserving consistency across languages and facilitating easier management and updating of dynamic content. After translation, verify the implementation to ensure correct replacement of placeholders with actual values, enabling seamless integration into your application.

Upvotes: 0

Related Questions