Limited-Time Donation Special!
Upgrade to Snow for $20 USD and receive a free copy of Oblivion Light ($5 discount).
Upgrade to +Blizzard for $35 USD and receive a free copy of Oblivion Light ($15 discount).

Please visit the thread below for more details.
CLICK HERE

Contact @Davlin with questions or comments.

Jump to content
thefiredragon

Windows Server PHP setlocale()

Recommended Posts

Hey there,

Perhaps someone here can help me, I'm new,

I'm using windows server 2012 with iis and php for my ipb4.
All things is working fine, but I have a big problem with the charset, and don't know to configure it right.

The big problem is, that I can't change the locale in the acp, under langugage I have de-de and the currency is EURO
but the page only show me $.

I found this but I don't know where I shoud input the script
http://stackoverflow.com/questions/18513742/ru-ru-russian-setlocale-not-working-on-date-and-time

the process bar for donations is also not working on my site, 

Bildschirmfoto31.png
perhaps someone know this prob, thx thefiredragon

Share this post


Link to post
Share on other sites

Hello and welcome to webflake @thefiredragon

First of all make sure you use UTF-8 as metadata and your database.

You can in

AdminCP > Customization > Your Theme > Edit HTML / CSS > globalTemplate

Find </header> and before that add

<meta charset="UTF-8">

 

Share this post


Link to post
Share on other sites

I have add this before </head> at the globalTemplate, but it don't have a result,

Im looking longer for a solution, because its important for the donations and later for the shop, that this will work...
I tried to set up in IIS all to utf-8 without result... also by asp to the globalization....

Do you have another Idea?
Thank you for your help,

 

Edited by thefiredragon

Share this post


Link to post
Share on other sites

I insert this before </head> at the globaleTemplate

<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">

but theres also no result. It show all äüö , but only $ and dont change this to €.... the processbar also...I find this really strange... It must be a server problem I think

Share this post


Link to post
Share on other sites

What is the problem with the progress bar ?

14 minutes ago, thefiredragon said:

but only $ and dont change this to €

€ and $ are both UTF-8 and not a standard :) those are signs not special letters :) 

Share this post


Link to post
Share on other sites

I have create a test.php

https://www.dhiud.de/test.php

I don't know where the error is

 

test.php:

<?php
if (setlocale(LC_ALL, 'de_DE.utf8') == false) { print "<h1>Fehler beim einstellen der Sprache!</h1>"; } 
print "Aktuelle Sprache ist: ".setlocale(LC_ALL, 0);  
?>

Edited by thefiredragon

Share this post


Link to post
Share on other sites

A smart trick here is to use the code <> tag. but why have a if statement if you do not have a else statement ?

So your saying to me in that script IF locale is set to de_DE false, then print <h1> tag. and just print random .setlocale?

 

Share this post


Link to post
Share on other sites

It was only a try to find the error, why ipb don't change to € ...I don't know if there's the error....
All other is working...only probs wiith the currency and the process bar
perhaps the prob is on other place.

Share this post


Link to post
Share on other sites
9 minutes ago, thefiredragon said:

It was only a try to find the error, why ipb don't change to € ...I don't know if there's the error....
All other is working...only probs wiith the currency and the process bar
perhaps the prob is on other place.

The locale for each user is setup by each user so a UK user will still see things in $ € or £

But the TIME will show as 12AM/PM instead of 24 hours.

You can try play with it in 

AdminCP > System > General Settings Make sure the country is set to your country 

Share this post


Link to post
Share on other sites

Well I'm no IIS wizzard since im mostly run everything in linux, so apache.

YOU can test xampp and see if that works better with the same setup

Share this post


Link to post
Share on other sites
What do you think? Remember the human.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×