Allow optionally giving an example to interpolation with i18n
See original GitHub issueI’m submitting a…
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
Current behavior
It is not possible to specify an example for interpolation text.
Expected behavior
We should be able to specify an example sometimes. Renaming the variable to make more sense is fine too, or adding more context in
Minimal reproduction of the problem with instructions
<span i18n="saying hi">
Hello, {{ name // i18n(ph="name", ex="John") }}
</span>
What is the motivation / use case for changing the behavior?
Our translators sometimes raise questions (these cause translations to be delayed) which could have been avoided if we had an example in the placeholder.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Interpolation - i18next documentation
Interpolation is one of the most used functionalities in I18N. It allows integrating dynamic values into your translations.
Read more >Internationalization in React: Interpolation, Formatting and ...
(This is optional but this gives an understanding of how the values are interpolated and translated). Now we will see how these keys...
Read more >Message Format Syntax - Vue I18n
Named interpolation allows you to specify variables defined in JavaScript. In the locale message above, you can localize it by giving the ...
Read more >i18n with tagged template literals in ECMAScript 2015
Let's start with an example of how we want to use the i18n tag. ... Matches optional type annotations in i18n strings. //...
Read more >Rails Internationalization (I18n) API - Ruby on Rails Guides
Abstract strings in your application into keyed dictionaries — e.g. flash messages, static text in your views, etc. Store the resulting dictionaries somewhere....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
How does this work while translating an attribute? Is
Example:
I have been unsuccessful in making a translation file that can handle the interpolation inside of an attribute.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.