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

no value substitution when key is used as template #3373

Open
haayman-imagem opened this issue Feb 25, 2025 · 1 comment
Open

no value substitution when key is used as template #3373

haayman-imagem opened this issue Feb 25, 2025 · 1 comment

Comments

@haayman-imagem
Copy link

I'm using the English string as the key of the translations, e.g. for Dutch:

{
   "Continue": "Verder",
  "Found {numResults}": "{numResults} gevonden"
}

When switching to English on our site, the translations object is almost empty, we just display the original key.
But it turns out that the {numResults} isn't substituted. We see the entire 'Found {numResults}'
So, is this a bug? Or is using the key as the template string not supported?

@BobbieGoede
Copy link
Collaborator

I haven't tried using template strings as keys myself, whether this is supported depends on vue-i18n so I recommend checking the issues there or seeing if it is documented: https://github.com/intlify/vue-i18n.

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

2 participants