ArabicToEnglishNamesTranslator 1.0.0

dotnet add package ArabicToEnglishNamesTranslator --version 1.0.0
                    
NuGet\Install-Package ArabicToEnglishNamesTranslator -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ArabicToEnglishNamesTranslator" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ArabicToEnglishNamesTranslator" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ArabicToEnglishNamesTranslator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ArabicToEnglishNamesTranslator --version 1.0.0
                    
#r "nuget: ArabicToEnglishNamesTranslator, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ArabicToEnglishNamesTranslator@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ArabicToEnglishNamesTranslator&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ArabicToEnglishNamesTranslator&version=1.0.0
                    
Install as a Cake Tool

ArabicToEnglishNamesTranslator

A .NET 8 library for translating Arabic names to their English phonetic equivalents. It uses a built-in dictionary of over 2,500 common Arabic names for exact matches and falls back to character-by-character transliteration for names not in the dictionary.

Features

  • Translates Arabic names to English using a dictionary of 2,500+ common names
  • Falls back to phonetic transliteration for unknown names
  • Normalizes Arabic diacritical marks (tashkeel) and character variations (e.g. أ / إ / آ → ا)
  • Handles compound names, multi-word names, and names with prefixes such as عبد (Abd) and أبو (Abu)
  • Supports Microsoft Dependency Injection out of the box

Installation

Install the package from NuGet:

.NET CLI

dotnet add package ArabicToEnglishNamesTranslator

Package Manager Console

Install-Package ArabicToEnglishNamesTranslator

PackageReference (in your .csproj)

<PackageReference Include="ArabicToEnglishNamesTranslator" Version="1.0.0" />

Usage

Without Dependency Injection

Instantiate ArabicNameTranslator directly:

using ArabicToEnglishNamesTranslator.Services;

var translator = new ArabicNameTranslator();

string english = translator.Translate("سامر علي");
Console.WriteLine(english); // Output: Samer Ali

string compound = translator.Translate("عبد القادر");
Console.WriteLine(compound); // Output: Abd Al-Qadir

With Dependency Injection (ASP.NET Core / Generic Host)

Register the translator in your service collection using the provided extension method:

using ArabicToEnglishNamesTranslator.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

// Register the translator as a singleton
builder.Services.AddArabicNameTranslator();

Then inject IArabicNameTranslator wherever you need it:

using ArabicToEnglishNamesTranslator.Abstractions;

public class MyService
{
    private readonly IArabicNameTranslator _translator;

    public MyService(IArabicNameTranslator translator)
    {
        _translator = translator;
    }

    public string GetEnglishName(string arabicName)
    {
        return _translator.Translate(arabicName);
    }
}

You can also resolve the translator directly from an IServiceProvider:

using ArabicToEnglishNamesTranslator.DependencyInjection;

var translator = serviceProvider.UseArabicNameTranslator();
string result = translator.Translate("أحمد محمد");

API Reference

IArabicNameTranslator

namespace ArabicToEnglishNamesTranslator.Abstractions
{
    public interface IArabicNameTranslator
    {
        /// <summary>
        /// Translates an Arabic name to its English phonetic equivalent.
        /// </summary>
        /// <param name="arabicName">The Arabic name to translate.</param>
        /// <returns>The English transliteration of the name.</returns>
        string Translate(string arabicName);
    }
}

ServiceCollectionExtensions

Method Description
AddArabicNameTranslator(this IServiceCollection) Registers IArabicNameTranslator as a singleton in the DI container.
UseArabicNameTranslator(this IServiceProvider) Resolves and returns the registered IArabicNameTranslator instance.

Examples

Arabic Name English Translation
سامر علي Samer Ali
عبد القادر Abd Al-Qadir
أبو نادر Abu Nader
محمد إبراهيم Mohammed Ibrahim
فاطمة الزهراء Fatima Al-Zahraa

Requirements

  • .NET 8.0 or later

License

This project is licensed under the terms included in the repository. See the LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 42 3/14/2026