Page 1 of 1

[solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Tue Jun 17, 2008 10:31 pm
by Dr.CSS
So from reading your tip/FAQ I'm assuming I can just upgrade it then change some things to show MLE/chinese...

Do you know if chinese will work, is there more than one lang. translation?...

Re: Upgrading CMSMS 1.2.5 to MLE

Posted: Wed Jun 18, 2008 7:43 am
by alby
mark wrote: So from reading your tip/FAQ I'm assuming I can just upgrade it then change some things to show MLE/chinese...

Do you know if chinese will work, is there more than one lang. translation?...

I do not want to say something wrong (because I never used this  :)) but I see (in core) zh_CN and zh_TW

PAY MUCH MUCH MUCH attention to uft-8

Alby

Re: Upgrading CMSMS 1.2.5 to MLE

Posted: Fri Jun 20, 2008 2:02 am
by Dr.CSS
OK problem solved...

When you have only 2 arrays for lang. then you need only 2 lines between last ), and ); and make sure you have no extra lines after ?> at end...

So summary...

Lines between )' and ); need to equal number of lang. you have...

Re: Upgrading CMSMS 1.2.5 to MLE

Posted: Fri Jun 20, 2008 7:15 am
by alby
mark wrote: When you have only 2 arrays for lang. then you need only 2 lines between last ), and ); and make sure you have no extra lines after ?> at end...

So summary...

Lines between )' and ); need to equal number of lang. you have...
:)

Can be a problem last ), ma empty line are not considerated in php.

Alby

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 12:06 pm
by Peciura
Well, I upgraded from 1.2.5 to CMSMS 1.5.3 and I have another solution. My config_lang.php looks like this:

Code: Select all

<?php
define('DEFAULT_LANG','lt');
$force_mle_default=true;
$default_lang_fallback=true;
$hls=array(
'en'=>array(
'block'=>'en',
'flag'=>'<img src="'.$config['root_url'] .'/images/lang/en_US.png" style="border:0; opacity:1;" alt="English" />',
'text'=>'English'
),
'lt'=>array(
'block'=>'lt',
'flag'=>'<img src="'.$config['root_url'] .'/images/lang/lt_LT.png" style="border:0; opacity:1;" alt="Lietuviškai" />',
'text'=>'Lietuviškai'
)
);
?>
and i cant see any white spaces or what so ever.
So i edited fileloc.php surrounded with ob_start(); and ob_clean();

Code: Select all

<?php
ob_start();
define("CONFIG_FILE_LOCATION", dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.php');
define("TMP_CACHE_LOCATION", dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'cache');
define("TMP_TEMPLATES_C_LOCATION", dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR . 'templates_c');
ob_clean();
?>
This basically catches  all excess output;

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 12:50 pm
by alby
Peciura wrote: Well, I upgraded to CMSMS 1.5.3 and I have another solution. My config_lang.php looks like this:
You don't say which version come from? I suppose pre 1.3 from your config_lang

Pay attention because your config_lang is not correct (look to "label" config_lang)
CMSMS don't know what language load! Look for locale_cms param

Alby

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 3:00 pm
by Peciura
I simply had warning

Code: Select all

 'Cannot modify header information - headers already sent by ('...'config_lang.php:1)'
. and i could not find any empty spaces or what so ever in config_lang.php.

I missed the difference among conf_lang.alby and conf_lang.alby.label, but languages somehow works and default language is correct. Isn't

Code: Select all

define('DEFAULT_LANG','lt');
enought ?  ::)

Do you mean i need ?

Code: Select all

'locale_cms'=>'lt_LT'
for me it doesn't make a lot of sense, because there is one country and one language. And in this case as usually "lt" is alias of  "lt_LT".

Any way i believe 'locale_cms'=>'lt_LT' will solve some problems in the future. Cheers ;)

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 3:37 pm
by alby
Peciura wrote: I simply had warning

Code: Select all

 'Cannot modify header information - headers already sent by ('...'config_lang.php:1)'
. and i could not find any empty spaces or what so ever in config_lang.php.
:1 is row #1 look for something  (hidden character/space/empty row)  before <?php

Peciura wrote: I missed the difference among conf_lang.alby and conf_lang.alby.label, but languages somehow works and default language is correct. Isn't

Code: Select all

define('DEFAULT_LANG','lt');
enought ?  ::)
This is correct but I say of locale language ....

Peciura wrote: Do you mean i need ?

Code: Select all

'locale_cms'=>'lt_LT'
for me it doesn't make a lot of sense, because there is one country and one language. And in this case as usually "lt" is alias of  "lt_LT".
No, CMSMS don't know alias; you can use label and block that you want .... lt, ltx, lty_FUN, foo_BAR, have.fun ...
but CMSMS don't know that must loading lt_LT.php file or admin/lang/lt_LT/admin.inc.php
what loading for es: es_ES, es_MX, es_CA, ...?

Alby

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 6:38 pm
by Peciura
Yep, basicly you were right. My config_lang.php looked in editor without any spaces
though it had starnge symbols '' in hex mode just before'<?php'. 
I saved config_lang.php in ascii format and it seems all problems including  inconsistent aperiance of site in different languages are gone.

Re: [solved] Upgrading CMSMS 1.2.5 to MLE

Posted: Mon May 18, 2009 7:57 pm
by alby
Peciura wrote: Yep, basicly you were right. My config_lang.php looked in editor without any spaces
though it had starnge symbols '' in hex mode just before'<?php'. 
I saved config_lang.php in ascii format and it seems all problems including  inconsistent aperiance of site in different languages are gone.
I know  ;)
you saved in UTF8 encoding but with BOM and this is weird

Alby