Skip to content

javad-majidi/farsi-reshaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

farsi reshaper

Farsi reshaper written in go

i just used http://bobardo.com/reshaper/ opensource javascript and extracted the core code and also used https://github.com/robertkrimen/otto package to import js into go.

the way it works is so simple just run the following in the terminal to get the package:

go get github.com/javad-majidi/farsi-reshaper@v1.0.1

then write this sample code:

package main

import (
	"fmt"
	"github.com/javad-majidi/farsi-reshaper"
)

func main() {
	fmt.Println(FarsiReshaper.Reshape("سلام احوال شما؟"))
}

output(reshaped farsi):

؟ﺎﻤﺷ ﻝﺍﻮﺣﺍ ﻡﻼﺳ

it is extremely useful for some packages like Fyne or other desktop packages in arabic and farsi languages.

It also has some unit tests and code coverage.

About

Farsi reshaper written in go

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages