arabize 1.0.0
arabize: ^1.0.0 copied to clipboard
Text utilities for Arabic apps, such as search normalization and digit conversion.
arabize #
Small text utilities for Arabic apps.
import 'package:arabize/arabize.dart';
normalizeArabic('إِسْلَامِيَّة'); // اسلاميه
toArabicDigits('2026'); // ٢٠٢٦
toWesternDigits('٢٠٢٦'); // 2026
normalizeArabic removes tashkeel and tatweel and unifies alef, ya and ta marbuta, so search matches what users mean. Use it on both the query and the searched text. Each mapping can be turned off with a named argument.
toArabicDigits takes easternVariant: true for the Persian and Urdu digit forms. toWesternDigits converts both forms back.
Part of arabize, which also has lint rules, a CLI and test helpers for Arabic and RTL Flutter apps.