Only one flag on site

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
Krokar

Only one flag on site

Post by Krokar »

Hello All,

mybe some answers already but I couldn't find them. My problem is :

CMS Made Simple 1.5.2 "Caguas" installed and working on my site. I add all database fields, flags... but in my right corner of the site I always see just actual language (English flag), even I have 5 languages all together.
If I do site preview from admin console I can see then French flag for example but I can not switch between languages obviosly because I have just flag from actual language always on and not others.

This is my config_lang.php :

define('DEFAULT_LANG', 'en');


$hls = array(


'en' => array(
'block'=>'en',
'flag'=>'',
'text'=>'English',
'locale_cms'=>'en_US',
),

  'sl' => array(
'block'=>'sl',
'flag'=>'',
'text'=>'Slovene',
'locale'=>'sl_SI.utf8@euro',
'locale_cms'=>'sl_SI',
),

  'de' => array(
'block'=>'de',
'flag'=>'',
'text'=>'German',
'locale'=>'de_DE.utf8@euro',
'locale_cms'=>'de_DE',
),

'fra' => array(
'block'=>'fr',
'flag'=>'',
'text'=>'France',
'locale'=>'fr_FR.utf8@euro',
'locale_cms'=>'fr_FR',
),
'esp' => array(
'block'=>'es',
'flag'=>'',
'text'=>'Espaniol',
'locale'=>'es_ES.utf8@euro',
'locale_cms'=>'es_ES',
),



Thank you.
Alex
alby

Re: Only one flag on site

Post by alby »

Krokar wrote: CMS Made Simple 1.5.2 "Caguas" installed and working on my site. I add all database fields, flags... but in my right corner of the site I always see just actual language (English flag), even I have 5 languages all together.
If I do site preview from admin console I can see then French flag for example but I can not switch between languages obviosly because I have just flag from actual language always on and not others.
Very very strange that you display flags in preview and not in site.
lang tag display flag/text of this language when you fill "Menu text" in that language; check if you have this

Alby
5ven
New Member
New Member
Posts: 2
Joined: Thu Apr 30, 2009 8:27 am

Re: Only one flag on site

Post by 5ven »

I am having exactly the same problem. I added {lang} to template, followed every step in Readme.first. Only the currently active/default language flag is visible on the public side. Admin-side seems to work properly.

Checked the {lang} function at plugins - seems like other languages are not "ready". How should one make a language "ready"? I have added menu items to languages at the admin side, each having title, content and menu title.

EDIT:
After clearing browser cache and cookies, I am getting these errors at the top:
Notice: Array to string conversion in /serverrootfolder/cmsms/mle/function.mle.php on line 122
Notice: Array to string conversion in /serverrootfolder/cmsms/mle/function.mle.php on line 122
Notice: Array to string conversion in /serverrootfolder/cmsms/mle/function.mle.php on line 122
Notice: Array to string conversion in /serverrootfolder/cmsms/mle/function.mle.php on line 122
Warning: Cannot modify header information - headers already sent by (output started at /serverrootfolder/cmsms/mle/function.mle.php:122) in /serverrootfolder/cmsms/include.php on line 266
Warning: Cannot modify header information - headers already sent by (output started at /serverrootfolder/cmsms/mle/function.mle.php:122) in /serverrootfolder/cmsms/index.php on line 342

EDIT: checked the function.mle.php, had to replace some code in there:
$language was array with three items, not a string. This mod made the errors disappear.

Code: Select all

	//Sort by quality and order
	usort($browser_langs, "language_accept_order");

	foreach($browser_langs as $language)
	{
		if(strlen($language[0]) > 2) $language = substr($language, 0, 2);
		if(in_array($language[0], array_keys($t_hls['parent']))) return $t_hls['parent']["{$language[0]}"];
	}
	return DEFAULT_LANG;
EDIT: My bad :) I should have checked how admin side works - what do the empty lines mean at the content tree part. I clicked on edit, changed name and content and got another language link visible.
Last edited by 5ven on Mon May 04, 2009 12:44 pm, edited 1 time in total.
Heribert
New Member
New Member
Posts: 2
Joined: Tue May 26, 2009 1:00 pm

Re: Only one flag on site

Post by Heribert »

Hi,

I found the same problem after upgrading to 1.5.4. but only in IE. Other browsers shows the flags correct. As a quick solution I disabled the opacity in the Global Settings: "opacity:0;".
Later on I will find a better solution.

Heribert
Locked

Return to “[locked] CMSMS MLE fork”