Unable to change locale settings
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Re: Unable to change locale settings
Code: Select all
echo (new NumberFormatter('de', NumberFormatter::PATTERN_DECIMAL, ",##0.##"))->format(1234567890.123); // Output: 1.234.567.890,12
echo (new NumberFormatter('de_CH', NumberFormatter::PATTERN_DECIMAL, ",##0.##"))->format(1234567890.123); // Output: 1'234'567'890.12
Re: Unable to change locale settings
We've streamlined the behavior in dev-master so you can use "price:default" and "%1$s %2$s" for swapping price value and currency ("price:default" has precedence over "%1$s %2$s"):
https://github.com/aimeos/ai-client-htm ... 2912206a24
https://github.com/aimeos/ai-client-htm ... 2912206a24
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Unable to change locale settings
Excellent, thank you! I can't currently switch to dev-master but will try it out later.We've streamlined the behavior in dev-master so you can use "price:default" and "%1$s %2$s" for swapping price value and currency ("price:default" has precedence over "%1$s %2$s"):
Re: Unable to change locale settings
Can you please list again what results you need, e.g. "de_FR" -> "1'234'567'890.12", "de_CH" -> ...?flomo wrote: ↑28 Oct 2019, 14:22Code: Select all
echo (new NumberFormatter('de', NumberFormatter::PATTERN_DECIMAL, ",##0.##"))->format(1234567890.123); // Output: 1.234.567.890,12 echo (new NumberFormatter('de_CH', NumberFormatter::PATTERN_DECIMAL, ",##0.##"))->format(1234567890.123); // Output: 1'234'567'890.12
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: Unable to change locale settings
I need "1'234'567'890.12", no matter the locale.Can you please list again what results you need, e.g. "de_FR" -> "1'234'567'890.12", "de_CH" -> ...?
But I already have a viable solution for this, by adding my own instance of view to the IOC. No need to spend more of your time for this, I already got more than excellent support for this open source project . Thanks again.