Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-03-07 09:05:17
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Wrong posting date language
My posting dates are displayed in English, though German is the chosen local language.
Trying the solutions provided in the FAQ did not help either.
The funny think is that on another TXP installation with the same host environment, the posting dates are correctly displayed in German. The only difference between the 2 installation is that the one that displays dates in the wrong locale has started out with TXP 4.0.4 and has sequentially been updated to TXP 4.0.6. The one with the correct date language still runs on a fresh installation of TXP 4.0.5.
Offline
#2 2008-03-07 15:18:35
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Wrong posting date language
“High” diagnostics results, please.
Offline
#3 2008-03-08 19:47:29
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: Wrong posting date language
Thanks, Mary.
Textpattern-Version: 4.0.6 (r2805)
Letzte Aktualisierung: 2008-02-09 09:21:04/2008-03-08 19:39:52
Document Root: /home/SITE/www.SITE
$path_to_site: /home/SITE/www.SITE
Textpattern-Pfad: /home/SITE/www.SITE/textpattern
Schema der URLs: title_only
open_basedir: /home/:/tmp/:/usr/share/php/:/var/lib/php5
Temporäres Verzeichnis: /home/SITE.at/www.SITE/textpattern/tmp
Seiten-URL: www.SITE
PHP-Version: 5.2.0-8+etch10.1
GD-Graphikbibliothek: 2.0 or higher; Unterstützte Grafikformate: GIF, JPG, PNG.
Lokale Serverzeit: 2008-03-08 20:43:21
MySQL: 5.0.32-Debian_7etch5-log
Regionale Einstellungen: C
Server: Apache/2
PHP Server API: cgi-fcgi
RFC-2616-Header:
Betriebssystem des Servers: Linux 2.6.18-5-686
Aktive Plugins: ign_password_protect-0.4.2d, wet_quicklink-0.4.5, rss_admin_db_manager-4.3m, rss_pluginstaller-0.1, sed_plugin_library-0.3, sed_copyright-1.3, upm_img_popper-1.3.7, glx_if-0.6.4, upm_file_popper-0.1, upm_savenew-0.4, ajw_notepad_public-0.1m, zem_contact_lang-de-4.0.3.6, zem_contact_reborn-4.0.3.20, rss_auto_excerpt-0.5, Postmaster-0.4.4, rss_if_search_results-0.1, wet_recent_comments-0.4, ajw_admin_workflow-0.3.1, rss_author_info-0.2, wet_peex-0.3, zem_redirect-1.2-beta, wet_link-0.7, wet_slimpattern-0.4.1, wan_error_email-0.1, rah_chuck_norris-0.1, rvm_css-0.3, Postmaster Library-0.2.3
Voruntersuchung:
------------------------
Einige Textpattern-Dateien sind nicht aktuell:
/lib/classTextile.php
Einige Textpattern-Dateien wurden modifiziert:
/include/txp_category.php,
/include/txp_form.php,
/include/txp_import.php,
/include/txp_link.php,
/include/txp_preview.php,
/lib/IXRClass.php,
/lib/admin_config.php,
/lib/class.thumb.php,
/lib/constants.php,
/lib/txplib_update.php,
/publish/log.php,
/publish/search.php
Einige PHP-Funktionen sind deaktiviert.: show_source
------------------------
Inhalt der .htaccess-Datei:
------------------------
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^www\.SITE\$ [NC]
#RewriteRule ^(.*)$ http://SITE/$1 [R=301,L]
#RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
------------------------
Charset (default/config): latin1/latin1
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_filesystem: binary
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/share/mysql/charsets/
18 Tables: OK
PHP-Erweiterungen: zip/1.4.0, xmlwriter/0.1, libxml, xml, wddx, tokenizer/0.1, sysvshm, sysvsem, sysvmsg, session, SimpleXML, sockets, soap, SPL, shmop, standard/5.2.0-8+etch10.1, Reflection, posix, mime_magic/0.1, mbstring, json/1.2.1, iconv, hash/1.0, gettext, ftp, filter/0.9.5-dev, exif/1.4 $Id: exif.c,v 1.173.2.5.2.4 2006/10/10 22:22:43 tony2001 Exp $, dom/20031129, dba, date/5.2.0-8+etch10.1, ctype, calendar, bz2, bcmath, zlib/1.1, pcre, openssl, xmlreader/0.1, curl, gd, mysql/1.0, mysqli/0.1, PDO, pdo_mysql/1.0.2, suhosin/0.9.12, xsl/0.1, Zend Optimizer
pretext_data: array (
'id' => '',
's' => '',
'c' => '',
'q' => '',
'pg' => '',
'p' => '',
'month' => '',
'author' => '',
'request_uri' => '/efc37c5103440571570a84910addd584/?txpcleantest=1',
'qs' => 'txpcleantest=1',
'subpath' => '\\/',
'req' => '/efc37c5103440571570a84910addd584/?txpcleantest=1',
)
/../index.php: r2774 (66519e6f500fa0e59fa27567e97d3675)
/css.php: r2772 (4807cbc15661213f2b4d0fd26c7179ff)
/include/txp_admin.php: r2729 (0c2b3cf59ff433c943bcc293a526651a)
/include/txp_article.php: r2680 (49a7155d831f843bcf3e8de306dfe7f1)
/include/txp_auth.php: r2728 (c472bfbe49a71fd35e89000c8a18de08)
/include/txp_category.php: r2243 (3706fea923cd77f7053f7803de169df4)
/include/txp_css.php: r2730 (7974aa87728b39d3afaba5a3b18cf6b5)
/include/txp_diag.php: r2791 (aeb96445180b68c31821e237b6150332)
/include/txp_discuss.php: r2774 (852a8a4d4307358e161e0501124b7247)
/include/txp_file.php: r2530 (9f34fdbf98b9b649d65e2ced4c9ca763)
/include/txp_form.php: r1913 (16ec600b41438b4cca10d2c8a19b2db8)
/include/txp_image.php: r2668 (11269b464db6cfa3affff47674533a50)
/include/txp_import.php: r1238 (634e75d1b61958875ff275e3130f23ad)
/include/txp_link.php: r2463 (0a0171bf606296106332d3fdcb83a678)
/include/txp_list.php: r2725 (1ed6c6f729eaeb7f8a582b27cd5b9e78)
/include/txp_log.php: r2796 (f249e0962a996f05041b899fea91ccae)
/include/txp_page.php: r2717 (807ff04b4a649b54b3d710c1ab0a428f)
/include/txp_plugin.php: r2774 (e9fdc47a3ed9bdd13197d929161c6a13)
/include/txp_prefs.php: r2528 (50bd3be8c22e17d5ca2855ccea081bac)
/include/txp_preview.php: r1238 (5a4ae3ff0d68f4cb573d6d62a00ce9e8)
/include/txp_section.php: r2759 (9208297e0bd7b3d41bd0e6f9fc9ab120)
/include/txp_tag.php: r2774 (f371b400e8d7318e2ac48e032fe6c274)
/index.php: r2805 (ee8ab2e3c4bc9abd77aa7384ecba5268)
/lib/IXRClass.php: r765 (cbe59b59246dce060a4b4a52b4d448d8)
/lib/admin_config.php: r1747 (1563fcbaffe25b3272b0d85ff9d5571d)
/lib/class.thumb.php: r2329 (b2a2fda54371dbd6c40ba553941f090e)
/lib/classTextile.php: r2462 (34bd2f8efc57045de6234c376c996fda)
/lib/constants.php: r2361 (ab6d51668fab1e3c98e7d520b1a59f0f)
/lib/taglib.php: r2612 (727737ebd08127c632b9822bae87fee0)
/lib/txplib_admin.php: r2726 (c4f65bac2ddef62867f5bfee97ad7dfe)
/lib/txplib_db.php: r2748 (3feb369b1c34f251815cd6085a216d62)
/lib/txplib_forms.php: r2759 (a2d3de62110e582fab2a3a20224661f4)
/lib/txplib_head.php: r2783 (74ced647523a94da307af9853d7ed596)
/lib/txplib_html.php: r2696 (57985ebd2501bc303d2e97ae7538db1f)
/lib/txplib_misc.php: r2788 (7ecfaa5d4fabefbf411d01615dea9485)
/lib/txplib_update.php: r1239 (757f8189fcc53a795d7c807f17b2e788)
/lib/txplib_wrapper.php: r2800 (4ad38ee67f3ee8d9e7b51544a4f0f58b)
/publish.php: r2777 (0ce3da212329e7d34de07e53e109d182)
/publish/atom.php: r2774 (50aa384a2edf7cc07effee9020e0893b)
/publish/comment.php: r2776 (0e1ea64316087edcd75f394494b42100)
/publish/log.php: r1637 (a4a772567079f18101a1752446f3f6d4)
/publish/rss.php: r2793 (022caa22c756c64f2255aae6625686d8)
/publish/search.php: r1748 (b0182abc287055fe0932c263b2a5266d)
/publish/taghandlers.php: r2774 (59dc36e6dabc619e23c43f722fe7b8f1)
/update/_to_1.0.0.php: r711 (0f49fca8fbd8e6fca0fc48b0f69f0461)
/update/_to_4.0.2.php: r711 (e77c0e0d972868f19eaee4565bd0b4c4)
/update/_to_4.0.3.php: r711 (f5506cfd0fbc3ad4bd9a9b2299468775)
/update/_to_4.0.4.php: r711 (4d867b42ee87a7f11d2bff3a8e91bed0)
/update/_to_4.0.5.php: r2464 (dbe80cd4a775d3a43a203c3c4a2d0e3f)
/update/_to_4.0.6.php: r2464 (7e5ae73eb64c24438918697089a1f321)
/update/_update.php: r2792 (6ff7b4dedb2c7735a01e76b13b3f1fb1)
Offline
#4 2008-03-09 03:29:06
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Wrong posting date language
This would be why:
Regionale Einstellungen: C
You might be at the same host, but it appears that your host doesn’t have the German locales available on that specific server, does not have them installed correctly, or is using a locale name we aren’t aware of.
Here is the list of locales Textpattern will try to use if you have German set as your language:
- de_DE.UTF-8
- de_DE
- de
- deu
- german
- de_DE.ISO_8859-1
If none of these work, then it falls back to whatever default the machine is using.
So, contact your host and ask them about it. If they’re using some other locale name, then we’d need to add it to the list for Txp to check.
Offline
#5 2008-03-10 14:35:18
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: Wrong posting date language
This is my host’s answer:
Please use the function setlocale(). For example, you can use
- de_AT or
- de_AT.UTF-8
as German locale.
Edit: and in a second answer they write:
… but you are free to also use de_DE.UTF-8 oder de_DE (ISO-8859-1 variant)
So I am puzzled again …
Last edited by gerhard01 (2008-03-10 15:33:05)
Offline
Re: Wrong posting date language
Put this in your page template, then visit a page that uses that template. Viewing the source of that page should show the results of the locale test. If a locale shows up as FALSE, then it’s not installed on the server or locale functionality is not enabled on the server:
<txp:php>
echo '<!-- LOCALE TEST'."\n";
foreach(array('de_AT', 'de_AT.UTF-8', 'de_DE.UTF-8', 'de_DE') as $locale)
{
echo "setlocale(LC_ALL, '$locale') :". var_dump(setlocale(LC_ALL, $locale) . "\n";
}
echo '-->';
</txp:php>
Offline
#7 2008-03-10 20:46:47
- gerhard01
- Plugin Author
- Registered: 2006-12-07
- Posts: 108
Re: Wrong posting date language
ruud wrote:
Put this in your page template, ….
This is what I get:
<!-- LOCALE TEST
bool(false)
setlocale(LC_ALL, 'de_AT') :
string(11) "de_AT.UTF-8"
setlocale(LC_ALL, 'de_AT.UTF-8') :
string(11) "de_DE.UTF-8"
setlocale(LC_ALL, 'de_DE.UTF-8') :
string(5) "de_DE"
setlocale(LC_ALL, 'de_DE') :
-->
Replacing all occurences of
<txp:posted format="%d. %B %Y" />
with
<txp:php>
global $locale;
setlocale(LC_ALL, 'de_DE');
echo posted(array('format' => '%d. %B %Y'));
setlocale(LC_ALL, $locale);
</txp:php>
did the job.
Thanks!
Offline
Pages: 1