human_number 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +63 -0
- data/CHANGELOG.md +90 -0
- data/CLAUDE.md +219 -0
- data/Gemfile +23 -0
- data/LICENSE +21 -0
- data/README.md +323 -0
- data/Rakefile +12 -0
- data/config/locales/bn.yml +8 -0
- data/config/locales/de.yml +9 -0
- data/config/locales/en-GB.yml +10 -0
- data/config/locales/en-IN.yml +8 -0
- data/config/locales/en.yml +10 -0
- data/config/locales/es.yml +9 -0
- data/config/locales/fr.yml +9 -0
- data/config/locales/hi.yml +8 -0
- data/config/locales/ja.yml +15 -0
- data/config/locales/ko.yml +15 -0
- data/config/locales/ur.yml +8 -0
- data/config/locales/zh-CN.yml +9 -0
- data/config/locales/zh-TW.yml +9 -0
- data/config/locales/zh.yml +12 -0
- data/human_number.gemspec +42 -0
- data/lib/human_number/formatters/currency.rb +73 -0
- data/lib/human_number/formatters/number.rb +462 -0
- data/lib/human_number/locale_support.rb +125 -0
- data/lib/human_number/rails/helpers.rb +98 -0
- data/lib/human_number/railtie.rb +23 -0
- data/lib/human_number/version.rb +5 -0
- data/lib/human_number.rb +196 -0
- metadata +126 -0
data/README.md
ADDED
@@ -0,0 +1,323 @@
|
|
1
|
+
# HumanNumber
|
2
|
+
|
3
|
+
HumanNumber is a Ruby gem that implements accurate number formatting based on international standards. It references Microsoft Globalization documentation and Unicode CLDR standards to provide human-readable number formats that respect the unique formatting conventions of each country and region.
|
4
|
+
|
5
|
+
## Features
|
6
|
+
|
7
|
+
- π **International Standards Compliance**: Based on Microsoft Globalization and Unicode CLDR standards
|
8
|
+
- π’ **Cultural Number Systems**: Automatic selection of Western (K/M/B/T), East Asian (μ²/λ§/μ΅/μ‘°), or Indian (lakh/crore) systems
|
9
|
+
- π° **Currency Formatting**: ISO 4217 currency codes with native locale precision rules
|
10
|
+
- ποΈ **Intelligent Abbreviations**: Culturally-appropriate large number simplification
|
11
|
+
- π§ **Rails Integration**: Complete compatibility with Rails I18n infrastructure
|
12
|
+
- π **rails-i18n Based**: Leverages verified locale data
|
13
|
+
|
14
|
+
## Quick Start
|
15
|
+
|
16
|
+
Add to your Gemfile and install:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'human_number'
|
20
|
+
```
|
21
|
+
|
22
|
+
```bash
|
23
|
+
bundle install
|
24
|
+
```
|
25
|
+
|
26
|
+
Start formatting numbers:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'human_number'
|
30
|
+
|
31
|
+
# Human-readable numbers
|
32
|
+
HumanNumber.human_number(1_234_567) #=> "1.2M"
|
33
|
+
HumanNumber.human_number(50_000, locale: :ko) #=> "5λ§"
|
34
|
+
|
35
|
+
# Currency formatting
|
36
|
+
HumanNumber.currency(1234.56, currency_code: 'USD', locale: :en) #=> "$1,234.56"
|
37
|
+
HumanNumber.human_currency(1_234_567, currency_code: 'USD', locale: :en) #=> "$1.2M"
|
38
|
+
```
|
39
|
+
|
40
|
+
## Installation
|
41
|
+
|
42
|
+
Add this line to your application's Gemfile:
|
43
|
+
|
44
|
+
```ruby
|
45
|
+
gem 'human_number'
|
46
|
+
```
|
47
|
+
|
48
|
+
And then execute:
|
49
|
+
|
50
|
+
```bash
|
51
|
+
$ bundle install
|
52
|
+
```
|
53
|
+
|
54
|
+
Or install it yourself as:
|
55
|
+
|
56
|
+
```bash
|
57
|
+
$ gem install human_number
|
58
|
+
```
|
59
|
+
|
60
|
+
## API Reference
|
61
|
+
|
62
|
+
### Core Methods
|
63
|
+
|
64
|
+
#### `HumanNumber.human_number(number, **options)`
|
65
|
+
|
66
|
+
Formats numbers with intelligent, culturally-appropriate abbreviations.
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
# Basic usage
|
70
|
+
HumanNumber.human_number(1_234_567) #=> "1.2M"
|
71
|
+
HumanNumber.human_number(50_000, locale: :ko) #=> "5λ§"
|
72
|
+
HumanNumber.human_number(50_000, locale: :ja) #=> "5δΈ"
|
73
|
+
|
74
|
+
# Precision control (default: max_digits: 2)
|
75
|
+
HumanNumber.human_number(1_234_567, max_digits: 1) #=> "1M"
|
76
|
+
HumanNumber.human_number(1_234_567, max_digits: 3) #=> "1.23M"
|
77
|
+
HumanNumber.human_number(1_234_567, max_digits: nil) #=> "1M 234K 567"
|
78
|
+
|
79
|
+
# Unit preferences (Western locales only)
|
80
|
+
HumanNumber.human_number(1_000_000, abbr_units: true) #=> "1M"
|
81
|
+
HumanNumber.human_number(1_000_000, abbr_units: false) #=> "1 million"
|
82
|
+
|
83
|
+
# Minimum thresholds
|
84
|
+
HumanNumber.human_number(5_000, min_unit: 10_000) #=> "5000"
|
85
|
+
HumanNumber.human_number(50_000, min_unit: 10_000) #=> "50K"
|
86
|
+
|
87
|
+
# Zero trimming (default: true)
|
88
|
+
HumanNumber.human_number(1_000_000, trim_zeros: true) #=> "1M"
|
89
|
+
HumanNumber.human_number(1_000_000, trim_zeros: false) #=> "1.0M"
|
90
|
+
```
|
91
|
+
|
92
|
+
**Parameters:**
|
93
|
+
- `locale` (Symbol): Target locale for cultural number systems
|
94
|
+
- `max_digits` (Integer|nil): Maximum significant digits (default: 2, nil for complete mode)
|
95
|
+
- `abbr_units` (Boolean): Use abbreviated vs full units (default: true)
|
96
|
+
- `min_unit` (Integer): Minimum unit threshold for abbreviation (default: nil)
|
97
|
+
- `trim_zeros` (Boolean): Remove trailing decimal zeros (default: true)
|
98
|
+
|
99
|
+
#### `HumanNumber.currency(number, currency_code:, locale:)`
|
100
|
+
|
101
|
+
Standard currency formatting with native locale precision rules.
|
102
|
+
|
103
|
+
```ruby
|
104
|
+
HumanNumber.currency(1234.56, currency_code: 'USD', locale: :en) #=> "$1,234.56"
|
105
|
+
HumanNumber.currency(50_000, currency_code: 'KRW', locale: :ko) #=> "50,000μ"
|
106
|
+
HumanNumber.currency(1234.99, currency_code: 'JPY', locale: :ja) #=> "1,235ε"
|
107
|
+
|
108
|
+
# Cross-locale consistency (USD always 2 decimals, JPY always 0)
|
109
|
+
HumanNumber.currency(1234.56, currency_code: 'USD', locale: :ko) #=> "$1,234.56"
|
110
|
+
HumanNumber.currency(1234.56, currency_code: 'JPY', locale: :en) #=> "1,235ε"
|
111
|
+
```
|
112
|
+
|
113
|
+
#### `HumanNumber.human_currency(number, currency_code:, locale:, **options)`
|
114
|
+
|
115
|
+
Human-readable currency formatting with cultural abbreviations.
|
116
|
+
|
117
|
+
```ruby
|
118
|
+
HumanNumber.human_currency(1_234_567, currency_code: 'USD', locale: :en) #=> "$1.2M"
|
119
|
+
HumanNumber.human_currency(50_000, currency_code: 'KRW', locale: :ko) #=> "5λ§μ"
|
120
|
+
|
121
|
+
# Combined options
|
122
|
+
HumanNumber.human_currency(1_234_567, currency_code: 'USD', locale: :en, max_digits: 3) #=> "$1.23M"
|
123
|
+
HumanNumber.human_currency(1_234_567, currency_code: 'USD', locale: :en, max_digits: nil) #=> "$1M 234K 567"
|
124
|
+
```
|
125
|
+
|
126
|
+
### Rails Integration
|
127
|
+
|
128
|
+
In Rails applications, helper methods are automatically available:
|
129
|
+
|
130
|
+
```erb
|
131
|
+
<%= human_number(1_234_567) %> <!-- 1.2M -->
|
132
|
+
<%= human_currency(1_234_567, currency_code: 'USD') %> <!-- $1.2M -->
|
133
|
+
<%= currency(1234.56, currency_code: 'USD') %> <!-- $1,234.56 -->
|
134
|
+
|
135
|
+
<!-- With options -->
|
136
|
+
<%= human_number(1_234_567, max_digits: 3, locale: :ko) %> <!-- 123λ§ -->
|
137
|
+
<%= number_to_human_size(1_234_567) %> <!-- 1.2M (legacy) -->
|
138
|
+
```
|
139
|
+
|
140
|
+
## Cultural Number Systems
|
141
|
+
|
142
|
+
Different cultures have fundamentally different concepts for large numbers:
|
143
|
+
|
144
|
+
### Western System (K/M/B/T)
|
145
|
+
**Used by:** English, German, French, Spanish, Italian, Portuguese, Russian, Dutch, Swedish, Danish, Norwegian
|
146
|
+
|
147
|
+
```ruby
|
148
|
+
HumanNumber.human_number(1_234_567, locale: :en) #=> "1.2M"
|
149
|
+
HumanNumber.human_number(1_000_000_000, locale: :en) #=> "1B"
|
150
|
+
```
|
151
|
+
|
152
|
+
**Units:** thousand (1,000), million (1,000,000), billion (1,000,000,000), trillion (1,000,000,000,000)
|
153
|
+
|
154
|
+
### East Asian System (ε/δΈ/ε/ε
)
|
155
|
+
**Used by:** Korean (ko), Japanese (ja), Chinese (zh, zh-CN, zh-TW)
|
156
|
+
|
157
|
+
```ruby
|
158
|
+
HumanNumber.human_number(1_234_567, locale: :ko) #=> "123λ§"
|
159
|
+
HumanNumber.human_number(1_234_567, locale: :ja) #=> "123δΈ"
|
160
|
+
HumanNumber.human_number(100_000_000, locale: :ko) #=> "1μ΅"
|
161
|
+
```
|
162
|
+
|
163
|
+
**Units:** μ²/ε (thousand), λ§/δΈ (ten thousand), μ΅/ε (hundred million), μ‘°/ε
(trillion)
|
164
|
+
|
165
|
+
### Indian System (lakh/crore)
|
166
|
+
**Used by:** Hindi (hi), Urdu (ur), Bengali (bn), Indian English (en-IN)
|
167
|
+
|
168
|
+
```ruby
|
169
|
+
HumanNumber.human_number(100_000, locale: :hi) #=> "1 lakh"
|
170
|
+
HumanNumber.human_number(10_000_000, locale: :hi) #=> "1 crore"
|
171
|
+
```
|
172
|
+
|
173
|
+
**Units:** thousand (1,000), lakh (100,000), crore (10,000,000)
|
174
|
+
|
175
|
+
The gem automatically selects the appropriate system based on locale, ensuring cultural accuracy.
|
176
|
+
|
177
|
+
## Architecture & Design Philosophy
|
178
|
+
|
179
|
+
### Direct Method Design
|
180
|
+
|
181
|
+
HumanNumber uses direct class methods rather than instance-based objects for simplicity:
|
182
|
+
|
183
|
+
```ruby
|
184
|
+
# Direct approach (current)
|
185
|
+
HumanNumber.human_number(1234567, locale: :ko, max_digits: 2)
|
186
|
+
|
187
|
+
# Instance approach (rejected)
|
188
|
+
formatter = HumanNumber::Formatter.new(locale: :ko, max_digits: 2)
|
189
|
+
formatter.format(1234567)
|
190
|
+
```
|
191
|
+
|
192
|
+
**Why Direct Methods?**
|
193
|
+
- **Simplicity**: Clean, straightforward API
|
194
|
+
- **Thread Safety**: No shared mutable state
|
195
|
+
- **Rails Compatibility**: Matches Rails helper patterns
|
196
|
+
|
197
|
+
### Separation of Concerns
|
198
|
+
|
199
|
+
HumanNumber uses a two-stage formatting process:
|
200
|
+
|
201
|
+
1. **Number Formatting**: Converts numbers to human-readable strings with cultural units
|
202
|
+
2. **Currency Application**: Applies currency symbols and format strings
|
203
|
+
|
204
|
+
```ruby
|
205
|
+
# Internal flow for HumanNumber.human_currency(1234567, currency_code: 'USD', locale: :en)
|
206
|
+
formatted_number = Formatters::Number.format(1234567, locale: :en, max_digits: 2) #=> "1.2M"
|
207
|
+
final_result = Formatters::Currency.format("1.2M", currency_code: 'USD', locale: :en) #=> "$1.2M"
|
208
|
+
```
|
209
|
+
|
210
|
+
This separation enables:
|
211
|
+
- **Independent testing** of number vs currency logic
|
212
|
+
- **Reusability** of number formatting for non-currency contexts
|
213
|
+
- **Maintainability** when adding new currencies or number systems
|
214
|
+
|
215
|
+
### Centralized Locale Logic
|
216
|
+
|
217
|
+
Currency-locale relationships are managed centrally in `LocaleSupport`:
|
218
|
+
|
219
|
+
```ruby
|
220
|
+
CURRENCY_NATIVE_LOCALES = {
|
221
|
+
"USD" => [:en], "EUR" => %i[de fr es it nl],
|
222
|
+
"KRW" => [:ko], "JPY" => [:ja]
|
223
|
+
# ... 40+ currencies
|
224
|
+
}
|
225
|
+
```
|
226
|
+
|
227
|
+
This ensures:
|
228
|
+
- **Consistent precision rules**: USD always shows 2 decimals, JPY shows 0
|
229
|
+
- **Smart fallbacks**: When user locale doesn't match currency's native locale
|
230
|
+
- **Easy maintenance**: New currencies require only one mapping entry
|
231
|
+
|
232
|
+
### Configuration-Free Design
|
233
|
+
|
234
|
+
HumanNumber deliberately avoids runtime configuration in favor of explicit parameters:
|
235
|
+
|
236
|
+
```ruby
|
237
|
+
# No global configuration
|
238
|
+
HumanNumber.human_number(1234567, locale: :ko, max_digits: 2)
|
239
|
+
|
240
|
+
# Application defaults handled at application level
|
241
|
+
class ApplicationController
|
242
|
+
def format_money(amount, currency)
|
243
|
+
HumanNumber.human_currency(amount, currency_code: currency, locale: I18n.locale, max_digits: 2)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
```
|
247
|
+
|
248
|
+
**Benefits:**
|
249
|
+
- No shared state or thread safety concerns
|
250
|
+
- Predictable behavior (each call is independent)
|
251
|
+
- Easier testing (no configuration setup/teardown)
|
252
|
+
|
253
|
+
## Development
|
254
|
+
|
255
|
+
After checking out the repo:
|
256
|
+
|
257
|
+
```bash
|
258
|
+
$ cd human_number
|
259
|
+
$ bundle install
|
260
|
+
$ rake spec
|
261
|
+
```
|
262
|
+
|
263
|
+
Run tests:
|
264
|
+
```bash
|
265
|
+
$ rake spec
|
266
|
+
```
|
267
|
+
|
268
|
+
Run linting:
|
269
|
+
```bash
|
270
|
+
$ rake rubocop
|
271
|
+
```
|
272
|
+
|
273
|
+
Run all quality checks:
|
274
|
+
```bash
|
275
|
+
$ rake # Runs both spec and rubocop
|
276
|
+
```
|
277
|
+
|
278
|
+
## Contributing
|
279
|
+
|
280
|
+
1. Fork it (https://github.com/yourusername/human_number/fork)
|
281
|
+
2. Create your feature branch (`git checkout -b feature/my-new-feature`)
|
282
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
283
|
+
4. Push to the branch (`git push origin feature/my-new-feature`)
|
284
|
+
5. Create a new Pull Request
|
285
|
+
|
286
|
+
### Contribution Guidelines
|
287
|
+
|
288
|
+
- Please write tests when adding new features
|
289
|
+
- Follow RuboCop style guidelines
|
290
|
+
- Write clear and descriptive commit messages
|
291
|
+
- Update documentation for API changes
|
292
|
+
- Ensure 100% test coverage for new features
|
293
|
+
|
294
|
+
### Adding New Locales
|
295
|
+
|
296
|
+
To add support for a new locale:
|
297
|
+
|
298
|
+
1. Add locale to appropriate number system in `lib/human_number/formatters/number.rb`
|
299
|
+
2. Create locale file in `config/locales/` with unit translations
|
300
|
+
3. Add currency mapping to `CURRENCY_NATIVE_LOCALES` if applicable
|
301
|
+
4. Add comprehensive tests
|
302
|
+
|
303
|
+
## License
|
304
|
+
|
305
|
+
MIT License. See the [LICENSE](LICENSE) file for details.
|
306
|
+
|
307
|
+
## Standards Reference
|
308
|
+
|
309
|
+
This project is based on the following international standards and documentation:
|
310
|
+
|
311
|
+
- [Microsoft Globalization - Number Formatting](https://learn.microsoft.com/en-us/globalization/locale/number-formatting) - Cultural number formatting standards
|
312
|
+
- [Microsoft Globalization - Currency Formats](https://learn.microsoft.com/en-us/globalization/locale/currency-formats) - Currency formatting standards
|
313
|
+
- [Unicode CLDR](http://cldr.unicode.org/) - Locale data standards
|
314
|
+
- [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) - Currency code standards
|
315
|
+
- [rails-i18n](https://github.com/svenfuchs/rails-i18n) - Rails internationalization support
|
316
|
+
|
317
|
+
## Changelog
|
318
|
+
|
319
|
+
See [CHANGELOG.md](CHANGELOG.md) for details.
|
320
|
+
|
321
|
+
## Issues
|
322
|
+
|
323
|
+
Please report bugs and feature requests at [GitHub Issues](https://github.com/yourusername/human_number/issues).
|
data/Rakefile
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/human_number/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "human_number"
|
7
|
+
spec.version = HumanNumber::VERSION
|
8
|
+
spec.authors = ["Your Name"]
|
9
|
+
spec.email = ["your.email@example.com"]
|
10
|
+
|
11
|
+
spec.summary = "International standard-based number formatting for Ruby applications"
|
12
|
+
spec.description = "HumanNumber implements accurate number formatting based on international standards " \
|
13
|
+
"including Microsoft Globalization documentation and Unicode CLDR. Provides human-readable " \
|
14
|
+
"number formats with precise locale-specific decimal separators, thousand separators, " \
|
15
|
+
"currency formats, and cultural number conventions."
|
16
|
+
spec.homepage = "https://github.com/yourusername/human_number"
|
17
|
+
spec.license = "MIT"
|
18
|
+
spec.required_ruby_version = ">= 3.1.0"
|
19
|
+
|
20
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/yourusername/human_number"
|
23
|
+
spec.metadata["changelog_uri"] = "https://github.com/yourusername/human_number/blob/main/CHANGELOG.md"
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
29
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
30
|
+
end
|
31
|
+
end
|
32
|
+
spec.bindir = "exe"
|
33
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
34
|
+
spec.require_paths = ["lib"]
|
35
|
+
|
36
|
+
# Runtime dependencies
|
37
|
+
spec.add_dependency "actionview", ">= 5.2"
|
38
|
+
spec.add_dependency "i18n", ">= 1.6", "< 2"
|
39
|
+
spec.add_dependency "rails-i18n", ">= 5.1"
|
40
|
+
|
41
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
42
|
+
end
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../locale_support"
|
4
|
+
|
5
|
+
module HumanNumber
|
6
|
+
module Formatters
|
7
|
+
class Currency
|
8
|
+
extend ActionView::Helpers::NumberHelper
|
9
|
+
|
10
|
+
class << self
|
11
|
+
# Internal formatter for applying currency symbols to pre-formatted number strings.
|
12
|
+
# All parameters are required - use HumanNumber.currency/human_currency for user-friendly interface.
|
13
|
+
#
|
14
|
+
# @param formatted_number [String] Pre-formatted number string
|
15
|
+
# @param currency_code [String] ISO 4217 currency code
|
16
|
+
# @param locale [Symbol, String] Locale for currency symbol and format rules
|
17
|
+
# @return [String] Formatted currency string with symbol and proper placement
|
18
|
+
#
|
19
|
+
# @api private
|
20
|
+
def format(formatted_number, currency_code:, locale:)
|
21
|
+
locale = locale.to_sym
|
22
|
+
|
23
|
+
# Use shared locale logic to determine display locale
|
24
|
+
display_locale = HumanNumber::LocaleSupport.primary_locale_for_currency(currency_code, locale)
|
25
|
+
|
26
|
+
# Apply currency formatting to the already formatted number
|
27
|
+
apply_currency_formatting(formatted_number, currency_code, display_locale)
|
28
|
+
end
|
29
|
+
|
30
|
+
private
|
31
|
+
|
32
|
+
def apply_currency_formatting(formatted_number, currency_code, locale)
|
33
|
+
# Get currency symbol
|
34
|
+
symbol = lookup_currency_symbol(currency_code, locale)
|
35
|
+
|
36
|
+
# Get currency format
|
37
|
+
format_string = lookup_currency_format(currency_code, locale)
|
38
|
+
|
39
|
+
# Handle negative numbers - move negative sign outside currency symbol
|
40
|
+
if formatted_number.start_with?("-")
|
41
|
+
clean_number = formatted_number[1..]
|
42
|
+
result = format_string.gsub("%u", symbol).gsub("%n", clean_number)
|
43
|
+
"-#{result}"
|
44
|
+
else
|
45
|
+
format_string.gsub("%u", symbol).gsub("%n", formatted_number)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def lookup_currency_symbol(currency_code, locale)
|
50
|
+
# Use internal locale support to get currency symbol
|
51
|
+
symbol = lookup_i18n_value(:unit, locale:, currency_code:)
|
52
|
+
return symbol if symbol
|
53
|
+
|
54
|
+
# Final fallback to currency code
|
55
|
+
currency_code
|
56
|
+
end
|
57
|
+
|
58
|
+
def lookup_currency_format(currency_code, locale)
|
59
|
+
# Use internal locale support to get currency format
|
60
|
+
format = lookup_i18n_value(:format, locale:, currency_code:)
|
61
|
+
|
62
|
+
# Fallback to simple format for unknown currencies
|
63
|
+
format || "%u%n"
|
64
|
+
end
|
65
|
+
|
66
|
+
# Currency locale lookup methods using shared LocaleSupport
|
67
|
+
def lookup_i18n_value(key, locale:, currency_code:)
|
68
|
+
HumanNumber::LocaleSupport.lookup_currency_i18n_value(key, locale:, currency_code:)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|