khaled.alshamaa/ar-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

khaled.alshamaa/ar-php

Composer 安装命令:

composer require khaled.alshamaa/ar-php

包简介

Set of functionalities enable Arabic website developers to serve professional search, present and process Arabic content in PHP

README 文档

README

Contributor Covenant

Ar-PHP Project (ar-php.org)

PHP Speaks Arabic - Be Ready!

Copyright © 2006-2026 Khaled Al-Sham'aa.

DOI

العربية

Ar-PHP: Empowering Arabic Language Processing in PHP

Welcome to Ar-PHP, an open-source PHP library dedicated to simplifying Arabic language processing. Our mission is to provide developers with easy-to-use tools for professional searching, manipulating, and presenting Arabic text, enabling the creation of robust web applications that handle Arabic content effectively.

Table of Contents

Introduction

License

Adoption

Installation

Features

Change Log

Documentation

Contributing

Professional Support

FAQ

Introduction

Arabic Language

Internet use has grown quickly worldwide, especially in non-English speaking regions. Between 2000 and 2022, Arabic was the fastest-growing language online, increasing by 9,350%. It has around 240 million active users, making up 5.2% of internet users globally. This growth has created a demand for better Arabic web development tools, but most existing resources are geared toward English-speaking users.

[Arabic language, Internet world stats]

PHP

PHP is a widely used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP runs more than 75% of all the top 10 million worldwide websites; a few very good examples are Facebook and Wikipedia.

[PHP language, Server-side languages report]

LGPL

The key difference between the GPL and LGPL is that the LGPL allows a library to be linked to, or used by, a program that is not licensed under the (L)GPL. This means the program can be either free or proprietary software. If the program is not a derivative work of the library, it can be distributed under any license or terms chosen by its creator.

[LGPL, GNU FAQ]

Project History

محاضرة افتتاحية عن تجربة بناء ادوات لدعم اللغة العربية و المشاريع مفتوحة المصدر - خالد الشمعة

Alshamaa, Khaled (2008). PHP واللغة العربية. Dar Shoaa. Retrieved from https://darshoaa.com/pHP-and-Arabic-language/.

Top

License

Ar-PHP is dual-licensed. You may use, copy, modify, and distribute this library under either:

  • GNU LGPL v3 or later; or
  • Waqf Public License v2.0

You may choose either license. See LICENSE-LGPL and LICENSE-WAQF for details.

Top

Adoption

Ar-PHP has been successfully integrated into several projects, including:

  • Bagisto: A Laravel-based e-commerce package.
  • Akeneo: An open-source SaaS PIM platform for organizing product catalogs.
  • LimeSurvey: A powerful open-source survey software.
  • UnoPim: An open-source PIM system built on the Laravel framework.
  • GPDF: An open-source HTML-to-PDF converter for PHP & Laravel applications.
  • ArabKey: A tool for switching between Arabic and English keyboards.
  • Krayin: An Open Source CRM Software.

Star History Chart

Top

Installation

Installation with Composer

To install this package using Composer, run the following command in your terminal:

composer require khaled.alshamaa/ar-php

Ensure that the Composer autoloader is included in your project. If your project already uses Composer's autoloading mechanism -like frameworks such as Laravel- you can skip this step. Otherwise, add the following line early in your project's initialization code:

require 'vendor/autoload.php';

Manual Download and Installation

Download the latest Ar-PHP release, extract it into your project directory, and include the library by adding:

require_once 'ar-php/src/Arabic.php';

Ensure the path matches the location of the Arabic.php file relative to your script.

Top

Features

Top

Contributing

We welcome contributions from the community! Whether it is reporting bugs, suggesting new features, or submitting pull requests, your help is valuable. Before contributing, please review our project logistics and TODO list for current tasks and priorities. If you are migrating from an older version, check out our UPGRADE guide to ensure a smooth transition. No matter what your skills and interests are, there is a place where you can participate in improving the Ar-PHP project:

  • Programming: Here are some ideas for contribution: Review the To-Dos, add a feature, contribute to a core module, create an extension, and fix a bug.
  • Quality Assurance: Quality Assurance (QA) is one of the most important but understated elements of any software community project. It is also something most people can do. If you want to help fix Ar-PHP bugs and you are not a programmer, you can still help by joining the QA team.
  • Writing: One of the best ways to contribute to Ar-PHP is to write tutorials, guides, HOWTOs, and FAQs. Here are some ideas for contributions: User FAQs, HOW-Tos and Tutorials, a User Guide, a Development Primer, Blog Posts, and an Article for a Magazine.
  • Marketing: You can always help promote the use of Ar-PHP. Here are two ways you can help: Join the marketing events and distribute Ar-PHP and its brochures.
  • Graphics and Art: Have any art skills? Then you can help us create icons, logos, banners, labels, wallpapers, screen savers, and more! These will be seen every day and used throughout the project and its products.
  • Helping Users: There are two ways you can help other users: Users mailing list, and forums.
  • Celebrate with us! Your task is to take a picture of yourself supporting the PHP and Arabic language project. You can go to a famous landmark, your favorite place nearby, or anywhere you think will make for a great photo. We've created some posters for you to use in your pictures. Print out one of these designs or design your own. We want to see you and your location prominently displayed in the picture, so don't let one of them dominate the photo. And we should clearly see your Ar-PHP poster too. Once you have your photos ready to submit, email them to us. Please send your photos in .jpg or .png formats and at least 1200 x 800 pixels in size.

Top

Professional Support

As the developers of the Ar-PHP project, we can help your company leverage the maximum power of Ar-PHP to achieve your business goals. We offer professional services that span the full life cycle of Ar-PHP implementation.

  • Ar-PHP Library Integration: Having trouble getting started with Ar-PHP? We can help.
  • Ar-PHP Upgrades: For a smooth upgrade to a newer version of Ar-PHP, let us assist you.
  • Customization and Configuration: If your business requires functionality beyond or different from that of the feature set of Ar-PHP, our team of PHP and Arabic language experts can fully tailor Ar-PHP to meet your specific business needs.
  • Integration Analysis and Implementation: Arabic localization may be just a component of your entire online business operation. We have the knowledge and experience to integrate Ar-PHP with all the arms of your operation.
  • Troubleshooting, Optimization, and Performance Tuning: For increased performance and bottleneck resolution, let an Ar-PHP expert look under the hood of your Ar-PHP implementation and server environment.
  • Consulting: At any point in the implementation of Ar-PHP, you can call upon an Ar-PHP expert to verify that your implementation follows industry best practices.
  • Training: Get comprehensive training for Ar-PHP.

Top

Citation

If you would cite it in academic work, you can use this citation

K. Al-Shamaa, Ar-PHP, PHP library for website developers to process Arabic content, 
https://github.com/khaled-alshamaa/ar-php, 2026

or in bibtex format

@misc{ar-php,
  title={Ar-PHP, PHP library for website developers to process Arabic content},
  author={Al-Shamaa, Khaled},
  url={https://github.com/khaled-alshamaa/ar-php},
  version = {7.0.0},
  year={2026}
}

Top

khaled.alshamaa/ar-php 适用场景与选型建议

khaled.alshamaa/ar-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.83M 次下载、GitHub Stars 达 336, 最近一次更新时间为 2020 年 02 月 09 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「arabic」 「arabic-sentiment」 「arabic-numbers」 「arabic-glyphs」 「arabic-calendar」 「arabic-sql-query」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 khaled.alshamaa/ar-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 khaled.alshamaa/ar-php 我们能提供哪些服务?
定制开发 / 二次开发

基于 khaled.alshamaa/ar-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.83M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 337
  • 点击次数: 32
  • 依赖项目数: 24
  • 推荐数: 0

GitHub 信息

  • Stars: 336
  • Watchers: 19
  • Forks: 58
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2020-02-09