Search packages, repositories and app categories

GitHub repositoryolutter/persian

persian

Persian utilities for Dart and Flutter.

persian project cover
Stars
10
Forks
2
Last push (UTC)
Oct 22, 2025
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

pub package

Utilities and Humanizer for Persian language and culture.

Features

  • PersianDate class which converts a DateTime to Jalali date.
  • String corrections replacing ي with ی and ك with ک.
  • Humanize numbers to Persian text: 123 => صد و بیست و سه.
  • Convert numbers to Persian numbers: 123 => ۱۲۳.
  • Can be used in Dart and Flutter projects.
  • Supports all platforms (Android, iOS, macOS, Windows, Linux, Web).

Getting Started

In your pubspec.yaml file add:

dependencies:
  persian: any

Usage

Import the package:

import 'package:persian/persian.dart';

Then, use the extension methods:

String myText = '123456789';
String myPersianText = myText.withPersianNumbers(); //Will be ۱۲۳۴۵۶۷۸۹
DateTime myDate = DateTime.now();
PersianDate myPersianDate = myDate.toPersian(); //Will be 1398/10/19
int number = 123456789;
String myPersianNumber = number.toPersianString(); //Will be صد و بیست و سه میلیون و چهارصد و پنجاه و شش هزار و هفتصد و هشتاد و نه
olutter GitHub avatar
GitHub author

olutter ↗

LanguagesDart

Packages published by this repository

Dependencies used

Dependency list 2 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗