-
|
For the example below, in place of const translations: Translation {
tax: 'Price: ${price:number}. {taxes|{yes: An additional tax will be collected. , no: No taxes apply.}}'
}
LL.tax({ price: '999', taxes: 'yes' })
// => 'Price: $999. An additional tax will be collected.'
LL.tax({ price: '99', taxes: 'no' })
// => 'Price: $99. No taxes apply.'From example: https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/runtime#switch-case |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
|
Hi @artola, |
Beta Was this translation helpful? Give feedback.
-
|
You can update the latest version ( |
Beta Was this translation helpful? Give feedback.
-
|
@ivanhofer It is perfect. Thanks! |
Beta Was this translation helpful? Give feedback.
You can update the latest version (
5.18.0) and it should work like expected.