Angular pipe to pseudo-translate html text
This angular pipe can be used to pseudo-translate the text content to visualize any clippings or messed-up user interface components
Pseudo Localization is a way to simulate translation of English UI strings, without waiting for, or going to the effort of doing real translation
Early problem detection before actual translation of text takes place.
Text that is cut off (truncation)
Strings that are formed by combining (concatenation)
Strings that are not made localizable (hard-coding)
example usage:
<button class="btn btn-primary" (click)="convert(val.value)">{{getBtnText() | ngPseudoTranslate:true}}</button>
You can also disable pseudo translation for a template by setting arg to false, and it will render it as is.
<button class="btn btn-primary" (click)="convert(val.value)">{{getBtnText() | ngPseudoTranslate:false}}</button>
npm install ng-pseudo-translate
import { NgPseudoTranslateModule } from "ng-pseudo-translate";
@NgModule(
...
imports: [NgPseudoTranslateModule]
...
)
inspired from https://github.com/tryggvigy/pseudo-localization