I'm using gettext with the new version of XAMPP (5.3.0) on Windows Seven RTM (build 7600)
gettext-support is enabled.
It used to work perfectly a few weeks ago.
I'm not quite sure what changed this. Be it source changes or the new PHP version.
Now it's translating all the time to Germany although the default-language is English.
To test this, I got 2 files:
gettext.php
Code: <?php
error_reporting(E_ALL);
include("config.inc.php");
echo $locale;
setlocale(LC_ALL, "eng_USA");
echo '
'.gettext('Which data is transferred by the client ?');
?>
localization.php
Code: <?php
$locale = '';
$parameter=explode ( '/' , $_SERVER['REQUEST_URI']);
$locale_change = $parameter[1];
if ($locale_change!=false)
{
if ($locale_change=="de")
{
$locale = "de_DE";
setcookie("locale", $locale, time()+60*60*24*30, "/");// save a cookie
}
else if ($locale_change=="en")
{
$locale = "en_US";
setcookie("locale", $locale, time()+60*60*24*30, "/");// save a cookie
}
}
if (!$locale && isSet($_COOKIE["locale"]))
{
$locale = $_COOKIE["locale"];
}
$locale="en_US";
putenv("LC_ALL=$locale");//needed on some systems
putenv("LANG=$locale");//needed on some systems
putenv("LANGUAGE=$locale");//needed on some systems
bindtextdomain("messages", "./locale/");
bind_textdomain_codeset("messages", 'UTF-8');
textdomain("messages");
?>
The output is always:
en_US
Welche Daten sendet die Client-Software ?
setlocale return false for en_US. If I use the Windows-typical notation "eng_USA" then it returns
English_United States.1252 but the text will be translated to German anyways :/
I have really no clue what's going wrong.
I've put together these test-file and the local files if you want to see yourself what is going wrong. You can download it via www.ali.dj/gettext.zip
Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove the title from database please can somebody help me what i am missing in my code. here it is:Code:
question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.I have roughly 30 files. I want to be able to edit every $_POST and $_GETCode:
update post issues
I am trying to create an update to a post function, while the update does occur, the page routing and selecting of posts to be updated is whats getting screwed up. I have so many files involved in
Could Someone Please Debug This?
I was wondering if someone could debug this script for me. I realize it's not the tidest script (and probably not the most efficiant in the world) but it was quite late when I wrote it and I can't be
puting for loop in 1 value
hi ,how do i put this code in 1 value:Code: <?phpfor ($i=1; $i<=5; $i++) { echo $i ; }?>the output will be: 12345how do i put the result in one value ,some thing like :if the
How to insert random unique values in 2 columns ?
I have table with 2 columns
mysql UNION | warning mysql_fetch_array !!
Code: <?php $i = 0; $query1="SELECT * FROM `products` WHERE `division`='$f_usr_div' ORDER BY `pname` UNION SELECT `stock_close` FROM `stockiest_entry` WHERE
RSS poster script?
I have found a script that posts RSS's for me on a site that I'm building. However I would like to also post other articles that don't have a feed. Is there a legal/respectable way to harvest and post
Deleting a record php
Attempting to setup delete a record page. The below code I put together doesn't seem to work. | <?$delid=$_GET['delid'];echo $delid;if(isset($_POST['submit'])){$delquery="DELETE FROM table
passthru() help
Hi everyone,I'm new to the forum and to PHP. I have some pretty good experience writing shell scripts, but beyond that, I'm not much of a programmer. That being said, here's what I'm trying to do:I'm