Library for Arabic language support in Coherent Gameface
npm install gameface-arabic-rtl2
npm i gameface-arabic-rtl2
`
$3
###### Without gameface-arabic-rtl
!Without gameface-arabic-rtl
###### With gameface-arabic-rtl
!With gameface-arabic-rtl
$3
I use Abdulla Saeed's code. But had to manually rewrite it for ES5 due to the fact that on some platforms for the babel-loader, conversion to ES5 for node_modules is disabled.
$3
_gameface-arabic-rtl_ is declared as a Universal Module (UMD), meaning it can be used with all conventional Javascript module systems:
###### ES6
`
import { process } from 'gameface-arabic-rtl';
const text = 'مرحبا بالعالم';
const translateNumbers = true;
const convertedText = process(text, translateNumbers);
`
###### CommonJS
`
const GamefaceArabicRtl = require('gameface-arabic-rtl/dist/gameface-arabic-rtl.min.js');
const text = 'مرحبا بالعالم';
const translateNumbers = true;
const convertedText = process(text, translateNumbers);
`
###### RequireJS
`
require(['GamefaceArabicRtl'], (GamefaceArabicRtl) => {
const text = 'مرحبا بالعالم';
const translateNumbers = true;
const convertedText = process(text, translateNumbers);
});
`
###### HTML5
$3
Since Coherent Gameface does not support OpenType GSUB Table lookup, the required glyphs must be present in the font. For example:
`
'ﺖ'.codePointAt(0); // must NOT return undefined
``