Skip to content

Commit

Permalink
gettext-changes/bugfixes
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/phpsurveyor@1815 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jul 29, 2006
1 parent 40a3c9d commit 007ea82
Show file tree
Hide file tree
Showing 6 changed files with 1,760 additions and 1,250 deletions.
2 changes: 1 addition & 1 deletion classes/php-gettext/gettext.inc
Expand Up @@ -36,7 +36,6 @@ require('gettext.php');


// Variables

if (!defined("LC_MESSAGES"))
{
define("LC_MESSAGES",5);
Expand Down Expand Up @@ -179,6 +178,7 @@ function _textdomain($domain) {
* Lookup a message in the current domain.
*/
function _gettext($msgid) {

$l10n = _get_reader();
//return $l10n->translate($msgid);
return _encode($l10n->translate($msgid));
Expand Down
4 changes: 2 additions & 2 deletions classes/php-gettext/streams.php
Expand Up @@ -110,7 +110,7 @@ function read($bytes) {
// the discussions at PHP Bugs suggest it's the intended behaviour
while ($bytes > 0) {
$chunk = fread($this->_fd, $bytes);
$data .= $chunk;
@$data .= $chunk;
$bytes -= strlen($chunk);
}
$this->_pos = ftell($this->_fd);
Expand Down Expand Up @@ -163,4 +163,4 @@ function CachedFileReader($filename) {
}


?>
?>
6 changes: 5 additions & 1 deletion common.php
Expand Up @@ -58,7 +58,7 @@
$_SERVER['PHP_SELF'] = substr($_SERVER['SERVER_URL'], 0, -1) .$_SERVER['SCRIPT_NAME'];
}

/**
/*
* $sourcefrom variable checks the location of the current script against
* the administration directory, and if the current script is running
* in the administration directory, it is set to "admin". Otherwise it is set
Expand Down Expand Up @@ -1675,7 +1675,11 @@ function GetLanguageFromSurveyID($surveyid)

function SetInterfaceLanguage($languagetoset)
{
//@$locale = (isset($_GET['lang']))? $_GET['lang'] : DEFAULT_LOCALE;
//if (function_exists('T_setlocale')) T_setlocale(LC_MESSAGES, $locale);
// echo setlocale(LC_ALL, $languagetoset);
bindtextdomain($languagetoset, dirname(__FILE__).'/locale');
if (!function_exists('bind_textdomain_codeset')) echo "You need at least PHP 4.2.x to run PHPSurveyor." and die;
bind_textdomain_codeset($languagetoset,'UTF-8');
return textdomain($languagetoset);
}
Expand Down
1 change: 0 additions & 1 deletion config.php
Expand Up @@ -128,7 +128,6 @@
$maxemails = 100; // The maximum number of emails to send in one go (this is to prevent your mail server or script from timeouting when sending mass mail)
$mutemailerrors = 0; // If you want to mute annoying error messages from the emailscript set this to 1.
// This could be the case if your provider set a static sender_adress.

// JPGRAPH Settings
// To use jpgraph you must install and set up jpgraph, available from http://www.aditus.nu/jpgraph/
// PHPSurveyor has been tested using version 1.13. Documentation for this is available at the
Expand Down
Binary file modified locale/es/LC_MESSAGES/es.mo
Binary file not shown.

0 comments on commit 007ea82

Please sign in to comment.