Drake CMS Official Forums - read-only archive

You are reading the Drake CMS Official Forums archive, available for historical purposes only.

Drake CMS has been rebranded into Lanius CMS, visit the new Lanius CMS Official Forums if you need support about Lanius CMS or Drake CMS -> Lanius CMS migration.



Home page Help & Support > Error after language installation [Solved] Permanent link to this page
 
 
Author Message:
gogo12
Error after language installation [Solved]
20 January 2008 00:00
Anonymous Hello,
I've just reinstalled all new Drakecms because I was unable to reinstall the sql backup.

But now, with a brand new RC6 installation, I have installed the French language (CA). Everything has changed, except the date. It is still in English.

With the local installation, the date is ok (in french), but not on the hosting service. Probably their php settings are in English.

Do you have any solution?

Maybe it's my computer setting (but he is in French, just like all my software and browser default language).

Thanks
 
legolas558
Re: Error after language installation
20 January 2008 01:29
Anonymous Quote by gogo12:

Hello,
I've just reinstalled all new Drakecms because I was unable to reinstall the sql backup.


This happens when you use an SVN version to make the backups. You are always advised that SVN backups are not supported

Quote:

But now, with a brand new RC6 installation, I have installed the French language (CA). Everything has changed, except the date. It is still in English.

With the local installation, the date is ok (in french), but not on the hosting service. Probably their php settings are in English.

Do you have any solution?

Maybe it's my computer setting (but he is in French, just like all my software and browser default language).

Thanks


There are 2 possible reasons:

1. your language resources do not have a correct LOCALE definition (read the documentation regarding this)
2. your provider hasn't any French/Canadian locale installed
 
gogo12
Re: Error after language installation
20 January 2008 03:03
Anonymous Hello,
Quote:

There are 2 possible reasons:

1. your language resources do not have a correct LOCALE definition (read the documentation regarding this)


I've found the documentation about _LOCALE and found where it is in the common.php file. Here what it said in the common.php file :


// DO NOT edit this file manually, see http://drakecms.sourceforge.net/docs.php?page=translator/language _files
define('_LOCALE', "fr\nfr_CA\nFrançais"); /* r3540, special */
define('_LOCALE_DEFAULT_TIMEZONE', "America/Montreal"); /* r3540, special */


I've look in language manager\edit CA language and found :


_LOCALE Updated
Ceci est une ressource spéciale pour la langue, vous n'avez pas à la traduire; lire la documentation pour plus d'informations
enen_GBEnglish
And the translation is:
fr
fr_CA
Français


and also :


_LOCALE_DEFAULT_TIMEZONE Mis à jour
Ceci est une ressource spéciale pour la langue, vous n'avez pas à la traduire; lire la documentation pour plus d'informations
Europe/London
And the translation is:
America/Montreal


Theses translations fit exactly my settings.


To install the language pack, I've had to do it manually. Here is how I've done it:

1-Download the ca.tar.gz
2-uploade the file in the folder /lang
3-extract the content there
4-whent to language manager
5-repair the language file
6-set global setting to francais (french)
7-set all users to French default language (only one user: admin)
8-whent to front page

The date is still in English.

Also My php.ini settings are :

date
date/time support : enabled
Timezone Database Version : 2006.1
Timezone Database : internal
Default timezone : America/Montreal



Do you have any ideas whats wrong?


Quote:

2. your provider hasn't any French/Canadian locale installed


I don't understand what you means...sorry. Can you explain it please?
 
legolas558
Re: Error after language installation
20 January 2008 09:54
Anonymous Your language files are OK.

It is possible that neither fr, fr_CA and Français are understood by your remote system.

Try this code on your remote system (call the file lctest.php for example and put it in the Drake CMS root directory) and tell us what's the result.

Code:

<?php

## locale testing script

# @author legolas558



echo '<h3>Drake CMS rocks!</h3>';

echo '<pre>';



//this function is by bruno dot cenou at revues dot org

function list_system_locales(){

ob_start();

if (!@system('locale -a'))

return array();

$str = ob_get_contents();

ob_end_clean();

return split("\\n", trim($str));

}



$locales = list_system_locales();

if (!count($locales)) { // raw list of locales

echo 'Cannot retrieve locales list from system, using custom array with content ';

$locales = array('dutch' , 'nld');

var_dump($locales);

echo '<br />';

}

foreach($locales as $lc) {

if (!setlocale(LC_ALL, $lc)) {

echo 'failed setting <strong>'.$lc.'</strong> locale'."\n";

continue;

}

echo 'Today is <u>'.strftime('%A').'</u> according to the <strong>'.$lc.'</strong> locale'."\n";

}

echo '</pre>'



?>


Thanks
 
gogo12
Re: Error after language installation
20 January 2008 16:33
Anonymous Hello,

I've done this:
1-I've create a php file call lctest.php
2-Past the code of the previous post
3-Upload the file in the root folder of the Drake-cms on my hosting services
4-call the lctest.php file on the browser.
5-This is the text displayed in the browser:


Quote:

Drake CMS rocks!
Cannot retrieve locales list from system, using custom array with content array(2) {
[0]=>
string(5) "dutch"
[1]=>
string(3) "nld"
}
failed setting dutch locale
failed setting nld locale


 
legolas558
Re: Error after language installation
20 January 2008 16:58
Anonymous OK, now please edit the line:
Code:

$locales = array('dutch' , 'nld');


and put there instead:

Code:

$locales = array('french' , 'fr', 'fr_CA', 'fr_FR');


What's the result after this modification?
 
gogo12
Re: Error after language installation
20 January 2008 17:10
Anonymous Hello,

This is the result :
Quote:

Drake CMS rocks!
Cannot retrieve locales list from system, using custom array with content array(4) {
[0]=>
string(6) "french"
[1]=>
string(2) "fr"
[2]=>
string(5) "fr_CA"
[3]=>
string(5) "fr_FR"
}
failed setting french locale
failed setting fr locale
failed setting fr_CA locale
failed setting fr_FR locale

 
legolas558
Re: Error after language installation
20 January 2008 18:03
Anonymous Well, the output says enough to understand that any of those locales is installed.

Please edit again that line this way and make a last try:
Code:

$locales = array('frc');


If the test also fails, please ask to your provider which locale is installed for your language (French Canadian). Maybe the identification string is different, or more probably maybe there is none installed!

I am sorry for these problems but we cannot do anything at the Drake CMS level, since localization must firstly be enabled on the system to be consistently supported.
 
gogo12
Re: Error after language installation
20 January 2008 19:46
Anonymous Hello,

After the test, I got :
Quote:

Drake CMS rocks!
Cannot retrieve locales list from system, using custom array with content array(1) {
[0]=>
string(3) "frc"
}
failed setting frc locale



As I understand, I have to ask my hosting provider to tell me wich locale is installed? is that correct?

And if possible, I have to ask him if the localization is enable for my account? Is that correct?


Thank you.
 
legolas558
Re: Error after language installation
21 January 2008 12:06
Anonymous Quote by gogo12:

Hello,

After the test, I got :
Quote:

Drake CMS rocks!
Cannot retrieve locales list from system, using custom array with content array(1) {
[0]=>
string(3) "frc"
}
failed setting frc locale



From all these tests we have realized that PHP cannot access any well-known French/Canadian localization on that system.

Quote:

As I understand, I have to ask my hosting provider to tell me wich locale is installed? is that correct?


Yes, the question could be "Which localizations are installed on the server?" He could issue a unix command like "locale -a" and tell you the results to perfectly answer your question.

Quote:

And if possible, I have to ask him if the localization is enable for my account? Is that correct?

Not really. Localization is not a special service or something that costs money/time to server mantainers. It is more like a configuration tweak, like installing additional language resources (system-wide). It is safe and does not require any additional server load.

If the localizations are installed maybe there is a configuration problem on their server and they are not working.
 
gogo12
Re: Error after language installation
21 January 2008 14:41
Anonymous Hello,

I've ask the question on my hosting forums, so when I will received the answer, I'll be back.

thanks.
 
gogo12
Re: Error after language installation
05 February 2008 17:49
Anonymous Hello,

Sorry for the delay.

I've ask the question to my hosting service and they told me that they won't install the proper localisation setting. The US English is the only one set (because it's by default).

So I have changed my hosting service. Then change again because the new one have a file size limit on 500kb for free account... But I am the kind of guy that want to try before using the paid services.

In the new hosting service, the localization work fine.

Thanks for your support.

Acl
 
trex1512
Re: Error after language installation
05 February 2008 22:23
Anonymous Hi

and thanks for the feedback...

Drake CMS soon to be ??? yet again shows its versatility.

TerryF
 
Top