This is a problem that hasn't been resolved in many CMS platforms, and will require additional coding.
Here is a description:
In English, where the number is larger than 999, the 'thousand separator' ('thousand point') delimiter is introduced, so that in larger numbers, the digits will be separated in groups of three, e.g. 5,000 and 340,000.
In Bulgarian, however, the thousand separator (a space) is only used for numbers larger than 9999. Numbers between 1000 and 9999 are correctly spelt without a separator, and it is only used for numbers larger than that, e.g. 10 000, 25 500, 500 000.
This results in prices or other units being incorrectly displayed, e.g. the price of a product that costs one thousand two hundred and fifty BGN will be displayed as '1 250', instead of the correct '1250'.
Without being too sure about this, I think the same rule applies to Russian, and possibly to other Slavonic languages.
Here is a description:
In English, where the number is larger than 999, the 'thousand separator' ('thousand point') delimiter is introduced, so that in larger numbers, the digits will be separated in groups of three, e.g. 5,000 and 340,000.
In Bulgarian, however, the thousand separator (a space) is only used for numbers larger than 9999. Numbers between 1000 and 9999 are correctly spelt without a separator, and it is only used for numbers larger than that, e.g. 10 000, 25 500, 500 000.
This results in prices or other units being incorrectly displayed, e.g. the price of a product that costs one thousand two hundred and fifty BGN will be displayed as '1 250', instead of the correct '1250'.
Without being too sure about this, I think the same rule applies to Russian, and possibly to other Slavonic languages.
Last edited by cheeseus on Sun May 17, 2015 7:12 pm, edited 2 times in total.
Easy to fix.
Just edit the main language file (which maybe in Bulgarian bg_BG) and adopt the value
to
Just edit the main language file (which maybe in Bulgarian bg_BG) and adopt the value
Code: Select all
$_['thousand_point'] = '.';
Code: Select all
$_['thousand_point'] = ' ';
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Sorry, but what do you expect now from us?cheeseus wrote:Please read my original post again.
It is not about what the 'thousand point' is, it is about WHERE it should be inserted.
To change to the code for Bulgarian numbers?
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
As I said, I think the same rule applies for Russian and other Slavonic languages as well.OSWorX wrote:Sorry, but what do you expect now from us?cheeseus wrote:Please read my original post again.
It is not about what the 'thousand point' is, it is about WHERE it should be inserted.
To change to the code for Bulgarian numbers?
I have now checked with a colleague Russian linguist and he has confirmed the same rule applies. I am not sure about other languages that use the Cyrillic script, but it is very likely that the rule applies there, too.
So the answer is "yes" -- but not just for Bulgarian, obviously -- for Russian as well.
As a 'starting' point.
Open
search for
and add before
And of course do a check for the language, otherwise this would be valid for all languages:
Open
Code: Select all
../system/library/corrency.php
Code: Select all
$string .= number_format(round($value,
Code: Select all
if( $value < 9999 ) {
$thousand_point = '';
}
Code: Select all
if( $this->config->get( 'config_language' ) == 'bg' ) { ... }
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Great, thank you!
This was fairly easy to implement. Just added, as per your instructions, the following code:
and the numbers now show correctly.
This was fairly easy to implement. Just added, as per your instructions, the following code:
Code: Select all
if ($this->config->get('config_language') == 'bg') {
if ($value < 9999) {
$thousand_point = '';
}
}
Who is online
Users browsing this forum: No registered users and 6 guests