svelte-i18n icon indicating copy to clipboard operation
svelte-i18n copied to clipboard

Docs on how to use variables in translation strings

Open halafi opened this issue 1 year ago • 1 comments

If I have a key for example "Foo {amount} bars" that should dynamically be resolved as:

Foo 1 bars Foo 2 bars ... etc.

depending on the variable passed there is no documentation / clarity whether this is supported

halafi avatar Dec 30 '23 06:12 halafi

I was able to achieve this with:

$_({
        id: "Foo {count} bars",
        values: { count: 7},
      })

however I think this still belong in the docs

halafi avatar Dec 30 '23 06:12 halafi