https://github.com/sahapranta/banglaconv
A Go library for converting numbers to Bengali words and Bengali numerals.
https://github.com/sahapranta/banglaconv
bangla golang golang-library
Last synced: about 2 months ago
JSON representation
A Go library for converting numbers to Bengali words and Bengali numerals.
- Host: GitHub
- URL: https://github.com/sahapranta/banglaconv
- Owner: sahapranta
- License: mit
- Created: 2025-01-25T18:40:17.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-03-06T18:00:41.000Z (2 months ago)
- Last Synced: 2025-03-06T18:32:57.947Z (2 months ago)
- Topics: bangla, golang, golang-library
- Language: Go
- Homepage: https://pkg.go.dev/github.com/sahapranta/banglaconv
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bengali Number Converter (banglaconv)
[](https://godoc.org/github.com/sahapranta/banglaconv)
[](https://goreportcard.com/report/github.com/sahapranta/banglaconv)

[](https://codecov.io/gh/sahapranta/banglaconv)
[](https://opensource.org/licenses/MIT)
[](https://github.com/sahapranta/banglaconv/actions/workflows/list_module.yml)
A Go library for converting numbers to Bengali words and Bengali numerals.
## Features
- Convert English numerals to Bengali numerals
- Convert numbers to Bengali word representation
- Supports integers and floating-point numbers
- Handles numbers up to crores (10,000,000)## Installation
```bash
go get github.com/sahapranta/banglaconv
```## Usage
```go
package mainimport (
"fmt"
"github.com/sahapranta/banglaconv"
)func main() {
// Convert to Bengali numerals
bengaliNum := banglaconv.ToBengaliNumber(1234)
fmt.Println(bengaliNum) // Output: ১২৩৪// Convert to Bengali words
bengaliWord, _ := banglaconv.ToBengaliWord(1234567)
fmt.Println(bengaliWord) // Output: বার লক্ষ চৌত্রিশ হাজার পাঁচশ সাতষট্টি// Works with floating-point numbers
floatWord, _ := banglaconv.ToBengaliWord(1234.56)
fmt.Println(floatWord) // Output: এক হাজার দুইশ চৌত্রিশ দশমিক পাঁচ ছয়word, _ := banglaconv.ToBengaliWord(0.05)
fmt.Println(word) //Output: শূন্য দশমিক শূন্য পাঁচ
}
```## Documentation
Visit the [GoDoc](https://godoc.org/github.com/sahapranta/banglaconv) page for the full documentation.## Testing
To run tests:
```bash
go test ./...
```To run benchmarks:
```bash
go test -bench=.
```## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
[MIT License](https://github.com/sahapranta/banglaconv/blob/main/LICENSE)