Search packages, repositories and app categories

Package detailsv2.0.0

persian

Utilities and Humanizer for Persian language and culture. Includes some String extensions and PersianDate class.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
55
Likes
45
Pub points
160

Install package

flutter pub add persian

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The persian package provides utilities and humanization tools for Persian language and culture in Flutter applications. It includes string extensions for common text manipulations and a PersianDate class to handle date formatting and conversions specific to the Persian calendar. Designed for developers targeting Persian-speaking audiences, it simplifies localization tasks such as date display, number formatting, and text processing. The package is compatible across all major platforms, ensuring consistent behavior on Android, iOS, Web, macOS, Windows, and Linux.

Use cases

  • Localizing apps for Persian speakers
  • Formatting Persian dates and numbers
  • String manipulation in Persian
  • Building culturally aware UIs
  • Handling Persian calendar conversions
  • Enhancing text readability in Persian

Key features

  • PersianDate class for calendar handling
  • String extensions for Persian text
  • Support for Persian number formatting
  • Cross-platform compatibility
  • Easy integration via pub
  • Cultural localization utilities

Suitable for

  • Flutter apps targeting Iran or Persian-speaking users
  • Developers working with Persian text and dates
  • Apps requiring accurate Persian calendar support
  • Internationalization (i18n) projects with Persian
  • Projects needing simple Persian language utilities

Considerations

  • Requires understanding of Persian calendar system
  • Limited to Persian language features
  • May need additional i18n setup for full localization
  • Not suitable for non-Persian languages
  • Depends on correct locale configuration
  • Best used in conjunction with broader localization strategies

Original README

Original README snapshot from the linked source repository. Visit the repository 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 صد و بیست و سه میلیون و چهارصد و پنجاه و شش هزار و هفتصد و هشتاد و نه

Categories

Source repository

Projects using this package

No data available yet.