ar-php
ar-php copied to clipboard
Basic utilities to support Arabic in PHP
The method `dateCorrection` is supposed to calculate the correction factor for the Hijri date conversion based on Um Alqura calendar. It supports date range 1420-1459, and should return a correction...
When using `arFromat`, the method `setOutputMode` will change the output language and month names.
setlocale at [line 189](https://github.com/alhoqbani/ar-php/blob/b2b2054e837a70555e2445171703f2dda6a52773/src/ArUtil/I18N/Transliteration.php#L189) in the Transliteration class is causing a problem in other parts of the code. When running the full test suit, codes with preg_split fail. I have...
All [example pages](https://github.com/alhoqbani/ar-php/tree/8febf9e06c6dfcd537d111724e5a1ba04b4f4666/public/Examples) need to be updated. The example code part of the page should be updated to show the new usage after using composer.
`normaliseLamaleph` [method](https://github.com/alhoqbani/i18n/blob/8c11b5a71171b9bf82a092832586c5b8d58feca4/Arabic/Normalise.php#L194) has undefined variables and indexes. It should be fixed or removed. For now, It will be disabled because it causing the main method `normalise` to fail.
When any of these methods is called (`setMode, getMode & setLang`) , line [255](https://github.com/alhoqbani/i18n/blob/9259adeaed3c1d4ff5a0d2826364d35729dfba99/Arabic.php#L255) will try to reload their respective classes. This is because different classes have methods with the...
From the example file: `"ٍمخصمغ لاعف سعقثمغ"` is swapped as: `Slowly ghut surely` where it should be: `Slowly but surely`. It's shown in the test at line [68](https://github.com/alhoqbani/i18n/blob/e14a8b7f51792e69c9e1d869aee762b10fdb2538/tests/Arabic/KeySwapTest.php#L68)
Method [cleanCommon](https://github.com/alhoqbani/i18n/blob/a0572e710b7d02a2f99e9ecfc576ebe797ade328/Arabic/AutoSummarize.php#L470) performs `str_replace`on the full string, without parsing the string into separate words. This will remove stopwords from the string even if it was part of a word. For...
The same as in #14 doRateSummarize has the same undefined variable.
When text is returned from `en2ar()` or `ar2en` on Transliteration class, the text has an extra space at the end. This is probably caused by lines [206](https://github.com/alhoqbani/i18n/blob/4b15df4e01afaf42f866fb374a59ba35e56314db/Arabic/Transliteration.php#L206) & [308](https://github.com/alhoqbani/i18n/blob/4b15df4e01afaf42f866fb374a59ba35e56314db/Arabic/Transliteration.php#L308)