Non-breaking space ( ) and other special chars
See original GitHub issueBoth v-t
and $t
doesn’t support special chars like
and so on. Using $t
with v-html
works well, but frequently it is needed as a “plain text” (without rendering HTML). By the way another localization plugins (e.g. vue-multilanguage
) support this feature.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:15 (1 by maintainers)
Top Results From Across the Web
How to Add a Non-breaking Space with the Character ...
In HTML, you can't create an extra blank space after the space ( ) character with the spacebar. If you want 10 blank...
Read more >  and HTML Space Challenges and Tricks | Mailtrap Blog
Nbsp stands for non-breaking space, meaning that strings separated with this entity will not be separated and put into separate lines. But ...
Read more >Non-breaking Space HTML Symbol, Character and Entity Codes
HTML symbol, character and entity codes, ASCII, CSS and HEX values for Non-breaking Space, plus a panoply of others.
Read more >Non-breaking space - Wikipedia
In word processing and digital typesetting, a non-breaking space, , also called NBSP, required space, hard space, or fixed space is a space...
Read more >“ ” U+00A0 No-Break Space (NBSP) Unicode Character
Unicode Character “ ” (U+00A0) ; Name: No-Break Space (NBSP) ; - Formerly: Nbsp ; Unicode Version: 1.1 (June 1993) ; Block: Latin-1...
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 FreeTop 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
Top GitHub Comments
is an HTML entity and it isn’t supposed to work outside ofv-html
. If you want a non-breaking space, use a JavaScript escape code and not an HTML entity. The one for a non-breaking space is\xa0
For most characters just paste the character in the text - all modern tools support Unicode fine. For things like non-breaking spaces the escape codes are useful because otherwise they’re kind of hard to see as they look just like normal spaces most of the time.
If we can avoid to ask translators to add such entities or special characters, I think we all agree that it is better. I’ve just found out that there is a
posTranslation
constructor option so the following work really well: