Use arabic language with latin numbers
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!
Use arabic language with latin numbers
Hello,
windows 10: 64
PostgreSQL 9.6.15
Laravel Framework 8.37.0
PHP 7.4.16
"php": "^7.3|^8.0",
"aimeos/aimeos-laravel": "~2021.04",
by default when I choose the arabic language, aimeos displays the numerals in arabic too, but it is arabic numeral is not used by all arabic countries (٠١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ ), it uses latin numbers (123 ..).
i want to use arabic language and latin numbers (123 ..)
thank you
windows 10: 64
PostgreSQL 9.6.15
Laravel Framework 8.37.0
PHP 7.4.16
"php": "^7.3|^8.0",
"aimeos/aimeos-laravel": "~2021.04",
by default when I choose the arabic language, aimeos displays the numerals in arabic too, but it is arabic numeral is not used by all arabic countries (٠١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ ), it uses latin numbers (123 ..).
i want to use arabic language and latin numbers (123 ..)
thank you
- Attachments
-
- nombre.png (8.39 KiB) Viewed 1932 times
Re: Use arabic language with latin numbers
This is automatically done by the browser and the option to use latin number seems to be to change the templates and define
explicitely for all numbers:
https://www.w3.org/International/articl ... di-markup/
Code: Select all
dir="ltr"
https://www.w3.org/International/articl ... di-markup/
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: Use arabic language with latin numbers
Hi,
I think this can not solve the problem .
Because when i type: ===> 9999.99
But when i type: ===> ٩٩٩٩.٩٩
i want to acces to the function number(. where is ?
thank you
I think this
Code: Select all
dir="ltr"
Because when i type:
Code: Select all
$priceItem->getValue() ;
But when i type:
Code: Select all
$this->number( $priceItem->getValue(), $priceItem->getPrecision() ), "$currency" )
i want to acces to the function number(. where is ?
thank you
Re: Use arabic language with latin numbers
The number view helper is available here:
https://github.com/aimeos/aimeos-core/b ... Locale.php
There's also another one available:
https://github.com/aimeos/aimeos-core/b ... andard.php
You can change it overwriting this method:
https://github.com/aimeos/aimeos-larave ... #L161-L170
And then in a Laravel service provider:
https://github.com/aimeos/aimeos-larave ... hp#L92-L94
https://github.com/aimeos/aimeos-core/b ... Locale.php
There's also another one available:
https://github.com/aimeos/aimeos-core/b ... andard.php
You can change it overwriting this method:
https://github.com/aimeos/aimeos-larave ... #L161-L170
And then in a Laravel service provider:
https://github.com/aimeos/aimeos-larave ... hp#L92-L94
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: Use arabic language with latin numbers
We've simplified that in aimeos/aimeos-laravel:dev-master and added a new config setting for the ./config/shop.php file:
If you checkout the master version, you can change the number formatter by adding:
Can you check if that works for you?
Code: Select all
'num_formatter' => 'Locale', // locale based number formatter (alternative: "Standard")
Code: Select all
'num_formatter' => 'Standard',
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: Use arabic language with latin numbers
Hi,
I checked this parameter it working perfectly!
Thank you
I checked this parameter it working perfectly!
Thank you