Skip to content
/ Persian Public
forked from rezkam/persian

Simple Python tool for Persian language localization.

License

Notifications You must be signed in to change notification settings

jbidad/Persian

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Persian

A simple Python library for Persian language localization.

Build Status

Python package like Persian.js

Install Package

pip install persian

How to use

import persian

Functions

Convert to Persian characters

Converting Arabic characters to Persian.

Example:

persian.convert_ar_characters("علي")  #returns: علی

Convert to Persian numbers from Arabic Number

Converting Arabic numbers to Persian.

Example:

persian.convert_ar_numbers("٣٤٥")  #returns: ۳۴۵

Convert Persian numbers to English numbers

Converting Persian numbers to English numbers

Example:

persian.convert_fa_numbers("۱۳۷۱")  #returns: 1371

Convert to Persian numbers from English Number

Converting English numbers to Persian.

Example:

persian.convert_en_numbers("345")  #returns: ۳۴۵

Change keyboard layout

Converting Persian char to English char.

Example:

persian.convert_en_characters("sghl")   #returns: سلام

Contributors

Contributing

This is a open-source project. Fork the project, complete the code and send pull request.

Run tests

  • python setup.py test
  • python -m unittest test/test_persian.py

About

Simple Python tool for Persian language localization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%