New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change currency symbol position #1446

Closed
roadster31 opened this Issue May 25, 2015 · 1 comment

Comments

Projects
None yet
4 participants
@roadster31
Contributor

roadster31 commented May 25, 2015

The currency symbol position is hardcoded in core/lib/Thelia/Tools/MoneyFormat.php: $number = $number . ' ' . $symbol;

The symbol position (or even the complete money format) should be a per-langage configuration parameter.

@bojanz

This comment has been minimized.

Show comment
Hide comment
@bojanz

bojanz May 31, 2015

It's not just the symbol position, it's also whether there's a space between the number and the symbol, the decimal separator, the grouping separator, the size of the primary and secondary digit groups.
All of this is per locale.

Thelia can require the intl extension and use its NumberFormatter class, or ship the CLDR data and reimplement the formatter like commerceguys/intl did.

commerceguys/intl is my library so I'm happy to answer questions about this problem space.

bojanz commented May 31, 2015

It's not just the symbol position, it's also whether there's a space between the number and the symbol, the decimal separator, the grouping separator, the size of the primary and secondary digit groups.
All of this is per locale.

Thelia can require the intl extension and use its NumberFormatter class, or ship the CLDR data and reimplement the formatter like commerceguys/intl did.

commerceguys/intl is my library so I'm happy to answer questions about this problem space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment