gosimple / slug

URL-friendly slugify with multiple languages support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

should not be english

eturerer opened this issue · comments

text := slug.Make("Hellö Wörld & хелло ворлд")
fmt.Println(text) // Will print: "hello-world-(and)-khello-vorld"

correct
fmt.Println(text) // Will print: "hello-world-khello-vorld"

Changing & to and in different languages was my exact reason for creating this package.
You can achieve what you want with configuring CustomSub:

slug.CustomSub = map[string]string{"&": ""}