Jump to content
WebFlake

Windows Server PHP setlocale()


thefiredragon

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

Link to comment
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">

 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
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
Link to comment
Share on other sites

11 minutes ago, thefiredragon said:

yes it is, utf-8mb4_unicode_ci

Read this might be of good assistance aswell :)

http://stackoverflow.com/questions/423693/how-can-i-properly-display-german-characters-in-html

The reply explains it the best :) 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
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 :) 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
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
Link to comment
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?

 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
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 

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...