Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs on how to use variables in translation strings #241

Open
halafi opened this issue Dec 30, 2023 · 1 comment
Open

Docs on how to use variables in translation strings #241

halafi opened this issue Dec 30, 2023 · 1 comment

Comments

@halafi
Copy link

halafi commented Dec 30, 2023

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
Copy link
Author

halafi commented Dec 30, 2023

I was able to achieve this with:

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

however I think this still belong in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant