Jump to content

IP.Board 4 & Windows Server 2012 R2


Recommended Posts

Hey there,

I have big thoruble with my currency and ipb4 on windows server,

I don't know If I have the right php.ini settings.
can someone help me?
This would be great.

Date and Time will work but the currency don't work. At the shop I only see a sign with "?" when I setup it to EUR and under languages to : de-de / German_Germany.1252 / deu

Dan

Link to comment
Share on other sites

With this I get the right currency:

 

<?php

$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);
echo $formatter->formatCurrency(-0.99, 'EUR'), PHP_EOL;

$formatter = new NumberFormatter('en_CA', NumberFormatter::CURRENCY);
echo $formatter->formatCurrency(-0.99, 'USD'), PHP_EOL;

?>

I don't understand it, IPB show up me this and remove the price from store:

 

 

 

 

Bildschirmfoto 2016-11-04 um 15.00.44.png

Link to comment
Share on other sites

I have solved this.

For using the right currency sign (Euro) on Windows I had to change a line at the lang.php

 

Replace this:
 

$this->locale = localeconv();

with that here:

		$locale_info_from_windows = localeconv();
		$locale_info_from_windows['currency_symbol'] = iconv('Windows-1252', 'UTF-8', $locale_info_from_windows['currency_symbol']);
		$this->locale = $locale_info_from_windows;

Best Regards,

Link to comment
Share on other sites

  • 1 year later...

The solution above works in other cases/locales too. I had a similar problem, but with a number separator for Polish language:

separator.png.727d3a1d4ab5d69fce8f16f0ff317a83.png

The issue was fixed using the following code:

$locale_info_from_windows = localeconv();
$locale_info_from_windows['thousands_sep'] = iconv('Windows-1252', 'UTF-8', $locale_info_from_windows['thousands_sep']);
$this->locale = $locale_info_from_windows;

 

List of supported values is listed here: localeconv.

Link to comment
Share on other sites

29 minutes ago, bfarber said:

This should already be happening (the convertString() method in Lang.php, though it uses CP1252 instead of windows-1252. You may wish to submit a ticket so we can look into why it isn't working for you.

Just to confirm, does it make any sense that I will submit a ticket again? I already did, reporting the issue among other things and I was misdiagnosed ("your utf8 conversion didn't process properly ") and told that a support for Windows environment is limited and I should move to a Linux environment for further diagnosis (!).

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...