{"id":15288767,"url":"https://github.com/sbagdat/turkish_numeric","last_synced_at":"2025-04-13T08:10:39.941Z","repository":{"id":51826882,"uuid":"336111697","full_name":"sbagdat/turkish_numeric","owner":"sbagdat","description":"Translate any numeric value into Turkish text, currency notation, or text representation of money.","archived":false,"fork":false,"pushed_at":"2021-05-09T18:19:22.000Z","size":33,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-02T01:53:04.439Z","etag":null,"topics":["money","num2text","num2word","numbers","numeric","rails","ruby","text","turkce","turkish"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbagdat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-04T23:37:45.000Z","updated_at":"2023-07-03T23:11:04.000Z","dependencies_parsed_at":"2022-08-03T03:00:32.541Z","dependency_job_id":null,"html_url":"https://github.com/sbagdat/turkish_numeric","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbagdat%2Fturkish_numeric","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbagdat%2Fturkish_numeric/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbagdat%2Fturkish_numeric/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbagdat%2Fturkish_numeric/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbagdat","download_url":"https://codeload.github.com/sbagdat/turkish_numeric/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681491,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["money","num2text","num2word","numbers","numeric","rails","ruby","text","turkce","turkish"],"created_at":"2024-09-30T15:53:08.154Z","updated_at":"2025-04-13T08:10:39.918Z","avatar_url":"https://github.com/sbagdat.png","language":"Ruby","readme":"# TurkishNumeric [![Gem Version](https://badge.fury.io/rb/turkish_numeric.svg)](https://badge.fury.io/rb/turkish_numeric)   [![Build Status](https://travis-ci.com/sbagdat/turkish_numeric.svg?branch=main)](https://travis-ci.com/sbagdat/turkish_numeric)  [![Code Climate](https://codeclimate.com/github/sbagdat/turkish_numeric/badges/gpa.svg)](https://codeclimate.com/github/sbagdat/turkish_numeric) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nTranslate any numeric value into Turkish text, currency notation and text representation of money.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'turkish_numeric'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install turkish_numeric\n\n## Usage\n\nFirst, you should require the gem (if you are using rails you don't need to require).\n\n```ruby\nrequire 'turkish_numeric'\n```\n\nIf you like shorter code lines you can include the module and can use `TrNum(numeric_value)` utility method. \nOtherwise you should use `TurkishNumeric::TrNum.new(numeric_value)` or `TurkishNumeric.TrNum(numeric_value)`.\nAt the examples below, shorter version is used.\n\n```ruby\ninclude TurkishNumeric\n```\n\n### Translating integer numbers\n\n```ruby\nTrNum(0).to_text          # =\u003e \"sıfır\"\nTrNum(34_430_002).to_text # =\u003e \"otuz dört milyon dört yüz otuz bin iki\"\nTrNum(-999999).to_text    # =\u003e \"eksi dokuz yüz doksan dokuz bin dokuz yüz doksan dokuz\"\n```\n\nYou can translate any integer value from **-999 * 10\u003csup\u003e63\u003c/sup\u003e** to **999 * 10\u003csup\u003e63\u003c/sup\u003e**.\n\n```ruby\nTrNum(999_000_000_999_000_000_000_000_000_000_000_000_000_000_009_900_000_000_000_000_000_000).to_text\n# =\u003e \"dokuz yüz doksan dokuz vigintilyon dokuz yüz doksan dokuz septendesilyon dokuz sekstilyon dokuz yüz kentilyon\"\n```\n\n### Translating floating point numbers\n\n```ruby\nTrNum(1234.00001).to_text    # =\u003e \"bin iki yüz otuz dört tam yüz binde bir\"\nTrNum(34_430_002.45).to_text # =\u003e \"otuz dört milyon dört yüz otuz bin iki yüzde kırk beş\"\nTrNum(12.00120012).to_text   # =\u003e \"on iki tam yüz milyonda yüz yirmi bin on iki\"\nTrNum(0.9999999999999999).to_text \n# =\u003e \"sıfır tam on katrilyonda dokuz katrilyon dokuz yüz doksan dokuz trilyon dokuz yüz doksan dokuz\n#     milyar dokuz yüz doksan dokuz milyon dokuz yüz doksan dokuz bin dokuz yüz doksan dokuz\"\n```\n\n### Translating as money\n\n```ruby\nTrNum(12.34).to_money    # =\u003e \"₺12,34\"\nTrNum(120.34).to_money   # =\u003e \"₺120,34\"\nTrNum(343_211_122_332.45).to_money   # =\u003e \"₺343.211.122.332,45\"\n```\n\nCustom currency symbol, thousand seperator, and penny seperator are also supported.\n\n```ruby\nTrNum(12_332.45).to_money(symbol: '€', \n                          thousand_sep: ',', \n                          penny_sep: '.') \n# =\u003e \"€12,332.45\"\n```\n\n### Translating as money text \n\n```ruby\nTrNum(234.05).to_money_text       # =\u003e \"ikiyüzotuzdörtTL,beşkr\"\nTrNum(600_000.125).to_money_text  # =\u003e \"altıyüzbinTL,onikikr\"\n```\n\nCustom currency and sub currency are also supported.\n```ruby\nTrNum(234.45).to_money_text(currency: 'USD', sub_currency: 'sent')\n# =\u003e 'ikiyüzotuzdörtUSD,kırkbeşsent'\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sbagdat/turkish_numeric. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/sbagdat/turkish_numeric/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the TurkishNumeric project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/sbagdat/turkish_numeric/blob/main/CODE_OF_CONDUCT.md).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbagdat%2Fturkish_numeric","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbagdat%2Fturkish_numeric","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbagdat%2Fturkish_numeric/lists"}