I am creating a multilingual website where the plugin in I am using only provides the option to show the language name entirely. I want to limit the character count to only 3 characters. Example: If the language is English I only want to display it as ENG, When it's Vietnamese it will be VIE.
I already tried
span {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 50px;
display: inline-block;
text-transform: uppercase;
font-size: 15px;
}
<p>
<span>English</span>
</p>
<p>
<span>Vietnamese</span>
</p>
I don't want the ...
appear with the first three letters and setting a width
or max-width
is not effective to show only 3 characters in some languages as you see in the above snippet. Is there are any alternative approaches there? Let me know, please.