Awesome
icu-pseudo-translate
Třáñƨℓáƭè ÌÇÛ ₥èƨƨáϱè ƨƭřïñϱƨ ïñƭô ƥƨèδúô-ƭřáñƨℓáƭèδ ÌÇÛ ₥èƨƨáϱè ƨƭřïñϱƨ.
install
yarn add icu-pseudo-translate
# or, probably..
yarn add icu-pseudo-translate --dev
use
const { pseudoTranslate } = require('icu-pseudo-translate');
pseudoTranslate(`On {takenDate, date, short} {name} took {numPhotos, plural,
=0 {no photos.}
=1 {one photo.}
other {# photos.}}`);
/**
outputs
`Óñ {takenDate, date, short} {name} ƭôôƙ {numPhotos, plural,
=0 {ñô ƥhôƭôƨ.}
=1 {ôñè ƥhôƭô.}
other {# ƥhôƭôƨ.}}`
*/
credits
- translator and printer taken largely from yahoo/react-intl examples
- character map from mr-White/gulp-pseudo-translate-angular-json